On 11/23/18 1:55 PM, Tom de Vries wrote:
> [ was: Re: [PATCH 2/2][libbacktrace] Don't point to released memory in
> backtrace_vector_release ]
> 
> On Thu, Nov 22, 2018 at 01:36:49PM +0100, Tom de Vries wrote:
>> Hi,
>>
>> When backtrace_vector_release is called with vec.size == 0, it releases the
>> memory pointed at by vec.base.
>>
>> In case of the backtrace_vector_release in alloc.c, vec.base may then be set
>> to NULL, but this is not guaranteed.
>>
>> Set vec.base set to NULL if vec.size == 0 to ensure we don't point to 
>> released
>> memory.
>>
>> OK for trunk if bootstrap and reg-test on x86_64 succeeds?
>>
> 
> Reposting patch with alloc.c part dropped, now that alloc.c has been rewritten
> to use free instead of realloc with size 0.
> 
> OK for trunk?
> 
> Thanks,
> - Tom
> 
> [libbacktrace] Don't point to released memory in backtrace_vector_release
> 
> When backtrace_vector_release is called with vec.size == 0, it releases the
> memory pointed at by vec.base.
> 
> Set vec.base set to NULL if vec.size == 0 to ensure we don't point to released
> memory.
> 
> Bootstrapped and reg-tested on x86_64.
> 
> 2018-11-22  Tom de Vries  <tdevr...@suse.de>
> 
>       * mmap.c (backtrace_vector_release): Same.
>       * unittest.c (test1): Add check.
Looks like this one still is relevant :-)

OK
jeff

Reply via email to