1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-08 22:50:27 +02:00

Correct read of freed memory

This commit is contained in:
pcpa 2015-03-01 11:38:41 -03:00
parent 531a88aeeb
commit 20955b2bfc
2 changed files with 7 additions and 7 deletions

View file

@ -1068,10 +1068,10 @@ int main(int argc, char *argv[])
@rem{/* call the generated code@comma{} passing its size as argument */}
myFunction((char*)jit_address(end) - (char*)jit_address(start));
jit_clear_state();
jit_disassemble();
jit_clear_state();
jit_destroy_state();
finish_jit();
return 0;
@ -1127,15 +1127,15 @@ call must be done after the @code{emit} call or either a fatal error
will happen (if @lightning{} is built with assertions enable) or an
undefined value will be returned.
@item jit_clear_state();
Note that @code{jit_clear_state} was called after executing jit in
this example. It was done because it must be called after any call
to @code{jit_address} or @code{jit_print}.
@item jit_disassemble();
@code{disassemble} will dump the generated code to standard output,
unless @lightning{} was built with the disassembler disabled, in which
case no output will be shown.
@item jit_clear_state();
Note that @code{jit_clear_state} was called after executing jit in
this example. It was done because it must be called after any call
to @code{jit_address} or @code{jit_print}.
@end table
@node RPN calculator

View file

@ -30,10 +30,10 @@ int main(int argc, char *argv[])
/* call the generated code, passing its size as argument */
myFunction((char*)jit_address(end) - (char*)jit_address(start));
jit_clear_state();
jit_disassemble();
jit_clear_state();
jit_destroy_state();
finish_jit();
return 0;