[all-commits] [llvm/llvm-project] 51ba7a: [libc][setjmp] disable -ftrivial-auto-var-init=pat...

Nick Desaulniers (paternity leave) via All-commits all-commits at lists.llvm.org
Mon May 20 14:06:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51ba7a816ccdadf7f943fb30a1933ded72a4c178
      https://github.com/llvm/llvm-project/commit/51ba7a816ccdadf7f943fb30a1933ded72a4c178
  Author: Nick Desaulniers (paternity leave) <nickdesaulniers at users.noreply.github.com>
  Date:   2024-05-20 (Mon, 20 May 2024)

  Changed paths:
    M libc/src/setjmp/x86_64/CMakeLists.txt

  Log Message:
  -----------
  [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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list