|
From: | Florian Weimer |
Subject: | Re: malloca, freea are not thread-safe |
Date: | Sat, 3 Feb 2018 13:28:45 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 02/02/2018 11:10 PM, Paul Eggert wrote:
This can cause problems when -fcheck-pointer-bounds is in effect, since converting a pointer to uintptr_t and back means that GCC won't connect the resulting pointer to the original and this messes up bounds checking on the result.
-fcheck-pointer-bounds in GCC doesn't really work. The existing implementation is barely a research prototype (for example, most string functions are not protected by it), and I don't think anyone knows how to make it thread-safe. Its existence shouldn't be used as a guidance for anything, really.
Thanks, Florian
[Prev in Thread] | Current Thread | [Next in Thread] |