* [Bug libstdc++/107940] temp_directory_path testcase broken
2022-11-30 20:47 [Bug libstdc++/107940] New: temp_directory_path testcase broken laurent.alfonsi at linaro dot org
@ 2022-11-30 22:00 ` redi at gcc dot gnu.org
2022-11-30 22:06 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-30 22:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107940
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to laurent.alfonsi@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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/107940] temp_directory_path testcase broken
2022-11-30 20:47 [Bug libstdc++/107940] New: temp_directory_path testcase broken laurent.alfonsi at linaro dot org
2022-11-30 22:00 ` [Bug libstdc++/107940] " redi at gcc dot gnu.org
@ 2022-11-30 22:06 ` pinskia at gcc dot gnu.org
2022-11-30 22:29 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-30 22:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107940
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> (In reply to laurent.alfonsi@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.
I suspect the problem is the unwinder which is why I put PR 107678 and PR
107675 as see also bug reports. Both are those are aarch64 specific issues
relating to unwind issues against the trunk. This might be the same issue there
too.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/107940] temp_directory_path testcase broken
2022-11-30 20:47 [Bug libstdc++/107940] New: temp_directory_path testcase broken laurent.alfonsi at linaro dot org
2022-11-30 22:00 ` [Bug libstdc++/107940] " redi at gcc dot gnu.org
2022-11-30 22:06 ` pinskia at gcc dot gnu.org
@ 2022-11-30 22:29 ` redi at gcc dot gnu.org
2022-11-30 22:49 ` laurent.alfonsi at linaro dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-30 22:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107940
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Thanks, Andrew, I hadn't noticed the See Also links. I agree this looks
related.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/107940] temp_directory_path testcase broken
2022-11-30 20:47 [Bug libstdc++/107940] New: temp_directory_path testcase broken laurent.alfonsi at linaro dot org
` (2 preceding siblings ...)
2022-11-30 22:29 ` redi at gcc dot gnu.org
@ 2022-11-30 22:49 ` laurent.alfonsi at linaro dot org
2022-12-01 14:23 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: laurent.alfonsi at linaro dot org @ 2022-11-30 22:49 UTC (permalink / raw)
To: gcc-bugs
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.alfonsi@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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/107940] temp_directory_path testcase broken
2022-11-30 20:47 [Bug libstdc++/107940] New: temp_directory_path testcase broken laurent.alfonsi at linaro dot org
` (3 preceding siblings ...)
2022-11-30 22:49 ` laurent.alfonsi at linaro dot org
@ 2022-12-01 14:23 ` redi at gcc dot gnu.org
2022-12-01 16:50 ` laurent.alfonsi at linaro dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-12-01 14:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107940
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Something seems very broken, and I don't think it's libstdc++.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/107940] temp_directory_path testcase broken
2022-11-30 20:47 [Bug libstdc++/107940] New: temp_directory_path testcase broken laurent.alfonsi at linaro dot org
` (4 preceding siblings ...)
2022-12-01 14:23 ` redi at gcc dot gnu.org
@ 2022-12-01 16:50 ` laurent.alfonsi at linaro dot org
2022-12-01 19:57 ` pinskia at gcc dot gnu.org
2022-12-03 21:24 ` laurent.alfonsi at linaro dot org
7 siblings, 0 replies; 9+ messages in thread
From: laurent.alfonsi at linaro dot org @ 2022-12-01 16:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107940
--- Comment #6 from laurent.alfonsi at linaro dot org <laurent.alfonsi at linaro dot org> ---
testing with other versions.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/107940] temp_directory_path testcase broken
2022-11-30 20:47 [Bug libstdc++/107940] New: temp_directory_path testcase broken laurent.alfonsi at linaro dot org
` (5 preceding siblings ...)
2022-12-01 16:50 ` laurent.alfonsi at linaro dot org
@ 2022-12-01 19:57 ` pinskia at gcc dot gnu.org
2022-12-03 21:24 ` laurent.alfonsi at linaro dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-01 19:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107940
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to laurent.alfonsi@linaro.org from comment #0)
> sanitizer=address reports an issue while stack unwinding :
>
> ==13419==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000
> (pc 0x0055012adf14 bp 0x0055007ff090 sp 0x0055007ff090 T0)
> ==13419==The signal is caused by a UNKNOWN memory access.
> ==13419==Hint: address points to the zero page.
The uninitialized memory dealing with the stack unwinding is recorded as PR
107678 and a patch was sent here:
https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607668.html (maybe that
will fix the issue recorded here too).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/107940] temp_directory_path testcase broken
2022-11-30 20:47 [Bug libstdc++/107940] New: temp_directory_path testcase broken laurent.alfonsi at linaro dot org
` (6 preceding siblings ...)
2022-12-01 19:57 ` pinskia at gcc dot gnu.org
@ 2022-12-03 21:24 ` laurent.alfonsi at linaro dot org
7 siblings, 0 replies; 9+ messages in thread
From: laurent.alfonsi at linaro dot org @ 2022-12-03 21:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107940
laurent.alfonsi at linaro dot org <laurent.alfonsi at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #8 from laurent.alfonsi at linaro dot org <laurent.alfonsi at linaro dot org> ---
(In reply to Andrew Pinski from comment #7)
>
> The uninitialized memory dealing with the stack unwinding is recorded as PR
> 107678 and a patch was sent here:
> https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607668.html (maybe
> that will fix the issue recorded here too).
Introducing fix pointed in PR107678 well fixes the crash I am observing.
However, I m not able to ensure the problem is fully fixed. Because, The
valgrind uninit issues I was observing when building in -static are still
present. As far as i have seen, crash not exposed in -static [chance?].
I proposed to mark it as duplicate of 107678.
Thanks Andrew, Thanks Prathamesh.
*** This bug has been marked as a duplicate of bug 107678 ***
^ permalink raw reply [flat|nested] 9+ messages in thread