https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112263
--- Comment #12 from vincenzo Innocente <vincenzo.innocente at cern dot ch> --- confirm that the patch solves the issue c++ -std=c++23 testStacktrace.cpp -lstdc++exp -g -DINLIB -fpic -shared -o liba.so -ldl;c++ -std=c++23 testStacktrace.cpp -lstdc++exp -g -DINMAIN -L. -la -Wl,-rpath=.; ./a.out 0# nested_func2(int) at /data/user/innocent/MallocProfiler/tests/testStacktrace.cpp:63 1# nested_func(int) at /data/user/innocent/MallocProfiler/tests/testStacktrace.cpp:93 2# func(int) at /data/user/innocent/MallocProfiler/tests/testStacktrace.cpp:101 3# main at /data/user/innocent/MallocProfiler/tests/testStacktrace.cpp:106 4# __libc_start_main at :0 5# _start at :0 6# what is the last empty entry is a different story I suppose (not an issue at the moment). Thanks again for the fast action