[PATCH] fix null pointer in mtrace

Carlos O'Donell carlos@redhat.com
Wed Nov 13 12:59:00 GMT 2019


On 11/13/19 4:36 AM, Liusirui wrote:
> In a multi-threaded program, some threads request or free memory and try to write trace info
> into file which "mallstream" points to. At the same time, another thread calls "muntrace" and
> set "mallstream" to NULL. This may cause a segmentation fault.
> 
> The comment in malloc/mtrace.c says "We could be printing a NULL here; that's OK.". Although
> the functions mtrace/muntrace are used for debugging, program isn't expected to crash while using
> these functions.
Just a reminder that we're still waiting on the completion of a corporate assignment from Huawei.

We can't accept these patches until that is complete.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list