https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107940
--- Comment #4 from laurent.alfonsi at linaro dot org <laurent.alfonsi at linaro dot org> --- (In reply to Jonathan Wakely from comment #1) > (In reply to laurent.alfo...@linaro.org from comment #0) > > This may be linked to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90787. > > But, I confirm my toolchain is based on trunk (13.0), and contains the 90787 > > fix. > > No, I don't think it's related to that in any way. > > valgrind and asan are both clean when running that test on > x86_64-pc-linux-gnu. > > Where does valgrind say there are uninitialized values? Maybe the problem is > in the unwinder. Plenty places : "More than 1000 different errors detected" Many are from init phase : ==47392== Conditional jump or move depends on uninitialised value(s) ==47392== at 0x497FB0: malloc ==47392== by 0x4C6E23: _dl_get_origin ==47392== by 0x4B0A0F: _dl_non_dynamic_init ==47392== by 0x4B147B: __libc_init_first ==47392== by 0x469DBB: (below main) Then from the testcase itself (test02): ==47392== Conditional jump or move depends on uninitialised value(s) ==47392== at 0x498034: malloc ==47392== by 0x40C70B: operator new(unsigned long) ==47392== by 0x401923: void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) [clone .isra.0] ==47392== by 0x4036F3: test02() ==47392== by 0x400DDB: main test03 : ==47392== Conditional jump or move depends on uninitialised value(s) ==47392== at 0x47B6F4: unsetenv ==47392== by 0x403FBF: test03() ==47392== by 0x400DDF: main