fortification and valgrind/memcheck (Was: [PATCH BZ#20422] Do not allow asan/msan/tsan and fortify@the same time)
Florian Weimer
fweimer@redhat.com
Wed Oct 5 11:49:00 GMT 2016
On 10/04/2016 02:15 PM, Mark Wielaard wrote:
> My proposal was to extend __chk_fail (or introduce a new __chk_fail_addr
> function) that provides the address that would have been accessed. Then
> valgrind just intercepts __chk_fail and uses that address to provide
> some additional information.
There many different reasons why __chk_fail might be called. For
example, you get a fortify failure if you call snprintf with a buffer
size that is larger than what is inferred by the compiler. This happens
even if the actual written value fits within the shorter space. So you
have a fortify failure without any invalid memory accesses.
Florian
More information about the Libc-alpha
mailing list