This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] fix null pointer in mtrace
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Liusirui <liusirui at huawei dot com>, libc-alpha at sourceware dot org
- Cc: siddhesh at gotplt dot org, dj at redhat dot com, hushiyuan at huawei dot com, liqingqing3 at huawei dot com
- Date: Wed, 13 Nov 2019 07:59:50 -0500
- Subject: Re: [PATCH] fix null pointer in mtrace
- References: <1573637811-7639-1-git-send-email-liusirui@huawei.com>
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.