Hi.
grischka <[email protected]> wrote:
|Steffen Nurpmeso wrote:
|> Yes it is, there is a double free in conjunction with the
|> preprocessor end_macro() (imagine a smile here). end_macro()
|> frees the macro and then that free_inline_functions or so tries to
|> frees it again, which causes a crash.
|
|I think this was possible when you get a compile error within
|the inline function.
|
|In this case because of the longjmp in tcc_compile, the TokenString
|was not removed from the macro_stack first, then it was freed in
|free_inline_functions, and then again in tccpp_delete:end_macro.
|
|Fixed here:
|http://repo.or.cz/tinycc.git/commitdiff/7c28c9b13f7c924c18920b51f42b1119c3b\
|1e2ee
tccgen.c: In function ‘free_inline_functions’:
tccgen.c:6549:13: warning: implicit declaration of function ‘tal_free’
[-Wimplicit-function-declaration]
tal_free(tokstr_alloc, fn->func_str);
^~~~~~~~
tccgen.c:6549:22: error: ‘tokstr_alloc’ undeclared (first use in this
function)
tal_free(tokstr_alloc, fn->func_str);
^~~~~~~~~~~~
tccgen.c:6549:22: note: each undeclared identifier is reported only once for
each function it appears in
make: *** [Makefile:187: tccgen.o] Error 1
Ciao (for today).
--steffen
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel