Sean Conner wrote:
As to the patch I think that
    +    s1->runtime_mem = NULL;
would break tcc_relocate and I don't see why you need it.

  I did that so that the call to tcc_delete() wouldn't crash when it tried
to free s->runtime_mem that might contain a garbage value (since
tcc_relocate_ex() would never set that field).  Good thing too, because
tcc_new() *might not* be initializing NULL pointers correctly [1].

Well, from my point of view that line would not fix tcc_new
but cause a memory leak for tcc_relocate.

  -spc (But I would feel safer with the NULL pointer assignment ... )

(That's what I suspected ...)

--- grischka

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to