Skip to content

Commit 51ba7a8

Browse files
[libc][setjmp] disable -ftrivial-auto-var-init=pattern for now (#92796)
This would consistently fail for me locally, to the point where I could not run ninja libc-unit-tests without ninja libc_setjmp_unittests failing. Turns out that since I enabled -ftrivial-auto-var-init=pattern in commit 1d5c16d ("[libc] default enable -ftrivial-auto-var-init=pattern (#78776)") this has been a problem. Our x86_64 setjmp definition disabled -Wuninitialized, so we wound up clobbering these registers and instead backing up 0xAAAAAAAAAAAAAAAA rather than the actual register value. The implemenation should be rewritten entirely. I've proposed three different ways to do so (linked below). Until we decide which way to go, at least disable this hardening feature for this function for now so that the unit tests go back to green. Link: #87837 Link: #88054 Link: #88157 Fixes: #91164
1 parent 753f7e8 commit 51ba7a8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libc/src/setjmp/x86_64/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ add_entrypoint_object(
99
COMPILE_OPTIONS
1010
-O3
1111
-fno-omit-frame-pointer
12+
# TODO: Remove once one of these lands:
13+
# https://github.com/llvm/llvm-project/pull/87837
14+
# https://github.com/llvm/llvm-project/pull/88054
15+
# https://github.com/llvm/llvm-project/pull/88157
16+
-ftrivial-auto-var-init=uninitialized
1217
)
1318

1419
add_entrypoint_object(

0 commit comments

Comments
 (0)