https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116656
--- Comment #4 from kargls at comcast dot net --- valgrind --leak-check=full ./z ==99899== Memcheck, a memory error detector ==99899== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==99899== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info ==99899== Command: ./z ==99899== construct_foo construct_foo ==99899== Conditional jump or move depends on uninitialised value(s) ==99899== at 0x40098D: MAIN__ (in /usr/home/kargl/tmp/z) ==99899== by 0x400A52: main (in /usr/home/kargl/tmp/z) ==99899== ==99899== Use of uninitialised value of size 8 ==99899== at 0x4009AC: MAIN__ (in /usr/home/kargl/tmp/z) ==99899== by 0x400A52: main (in /usr/home/kargl/tmp/z) ==99899== ==99899== Invalid read of size 8 ==99899== at 0x4009AC: MAIN__ (in /usr/home/kargl/tmp/z) ==99899== by 0x400A52: main (in /usr/home/kargl/tmp/z) ==99899== Address 0x28 is not stack'd, malloc'd or (recently) free'd ==99899== ==99899== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==99899== Access not within mapped region at address 0x28 ==99899== at 0x4009AC: MAIN__ (in /usr/home/kargl/tmp/z) ==99899== by 0x400A52: main (in /usr/home/kargl/tmp/z) ==99899== If you believe this happened as a result of a stack ==99899== overflow in your program's main thread (unlikely but ==99899== possible), you can try to increase the size of the ==99899== main thread stack using the --main-stacksize= flag. ==99899== The main thread stack size used in this run was 16777216. ==99899== ==99899== HEAP SUMMARY: ==99899== in use at exit: 5,478 bytes in 20 blocks ==99899== total heap usage: 20 allocs, 0 frees, 5,478 bytes allocated ==99899== ==99899== 1 bytes in 1 blocks are definitely lost in loss record 1 of 20 ==99899== at 0x484C2E4: malloc (vg_replace_malloc.c:450) ==99899== by 0x400890: __test_MOD_foo_construct (in /usr/home/kargl/tmp/z) ==99899== by 0x400936: __test_MOD_make (in /usr/home/kargl/tmp/z) ==99899== by 0x40097A: MAIN__ (in /usr/home/kargl/tmp/z) ==99899== by 0x400A52: main (in /usr/home/kargl/tmp/z) ==99899== ==99899== 1 bytes in 1 blocks are definitely lost in loss record 2 of 20 ==99899== at 0x484C2E4: malloc (vg_replace_malloc.c:450) ==99899== by 0x400890: __test_MOD_foo_construct (in /usr/home/kargl/tmp/z) ==99899== by 0x400942: __test_MOD_make (in /usr/home/kargl/tmp/z) ==99899== by 0x40097A: MAIN__ (in /usr/home/kargl/tmp/z) ==99899== by 0x400A52: main (in /usr/home/kargl/tmp/z) ==99899== ==99899== LEAK SUMMARY: ==99899== definitely lost: 2 bytes in 2 blocks ==99899== indirectly lost: 0 bytes in 0 blocks ==99899== possibly lost: 0 bytes in 0 blocks ==99899== still reachable: 5,284 bytes in 17 blocks ==99899== suppressed: 192 bytes in 1 blocks ==99899== Reachable blocks (those to which a pointer was found) are not shown. ==99899== To see them, rerun with: --leak-check=full --show-leak-kinds=all