On Sat, Sep 06, 2025 at 11:10:50AM +0100, Alberto Bertogli wrote:
cc -I../../libfiu/ -L../../libfiu/ -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -fPIC
-DFIU_ENABLE=1 -g -O2 -Werror=implicit-function-declaration
-ffile-prefix-map=/build/reproducible-path/libfiu-1.2=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -std=c99 -pedantic -Wall -std=c99
-pedantic -Wall tests/malloc.c -lfiu -o tests/malloc.bin
LD_LIBRARY_PATH=../../libfiu/ LD_PRELOAD="../../preload/run/fiu_run_preload.so
../../preload/posix/fiu_posix_preload.so" ./tests/malloc.bin
libc/mm/malloc - external callback not invoked
The problem is not the build of the library itself, but the malloc
preload test fails (the malloc callback is never invoked).
To reproduce, it's not enough to use gcc-15, it's the combination of
`gcc-15 -O2` that triggers the failure.
The malloc() call is getting inlined in `gcc-15 -O2`, that's why the
test fails.
There's nothing we can do about intercepting inlined functions, that's
an intrinsic limitation of the library and nothing new. What has changed
is malloc is now getting inlined in the conditions used in the test.
I'll see if I can adjust the test to force the compiler to never inline
that call.
Thanks,
Alberto