https://bugs.llvm.org/show_bug.cgi?id=49903
Bug ID: 49903
Summary: Stack corruption with -fstack-clash-protection + -O2
on ppc64le with clang 12
Product: new-bugs
Version: trunk
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: cl...@evan.coeusgroup.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org
Created attachment 24734
--> https://bugs.llvm.org/attachment.cgi?id=24734&action=edit
Test case
On clang 12 on ppc64le with -O2, -fstack-stack-protection sometimes causes some
of my tests to fail. I don't really speak PPC assembly so I've pretty much hit
the end of my ability to debug this further, sorry.
I'm attaching two test cases, one is the original (pre-processed), the other
has been run through cvise to try to reduce it, though I'm not sure that it
shows the same issue as the original (it seems to manifest as an infinite loop
instead of a segfault like the original).
Compile with something like:
clang -O2 -fstack-clash-protection -o test test.c -lm
The corruption doesn't always occur, so you may have to run it a few times.
For me, the counter in the function which calls the individual tests jumps from
76 to 140736792407376 (between the svml/mm256_cdfnorminv_pd and
svml/mm512_cdfnorminv_ps tests), and eventually there is a segfault.
I haven't been able to reproduce the problem with earlier versions of clang.
The code works on other architectures.
If there is anything else I can do to help please let me know. FWIW, I can
provide access to the machine I'm encountering this on, though I only have
clang-12 in an F32 docker container.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs