tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tcc_relocate() and tcc_relocate_ex()


From: grischka
Subject: Re: [Tinycc-devel] tcc_relocate() and tcc_relocate_ex()
Date: Mon, 13 Aug 2012 18:28:19 +0200
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]