Control: tags -1 upstream
Control: forwarded -1 https://sourceware.org/bugzilla/show_bug.cgi?id=32156

On 2024-09-09 11:42:43 +0200, Bernhard Übelacker wrote:
[...]
> In Bookworm and Trixie [3] the function mcheck always returns -1,
> because "IS_IN (libc)" seems to be true at compile time.
> 
> Reading the upstream commit comment [4] it looks like mcheck should
> just work when using libc_malloc_debug.so.
> 
> And indeed following also prints 0 in Trixie:
>   LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libc_malloc_debug.so.0 ./mcheck-test
[...]

Thanks. I've just reported the bug upstream.

In short:

Returning -1 is incorrect as it can introduce an error, while
not preloading libc_malloc_debug is not an error (this just
means that one does not wish to check memory). Returning 0
would be OK, since when one does not check memory, mcheck()
is never called too late (as its call should not have any
consequence).

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to