[all-commits] [llvm/llvm-project] 66f968: [libc][setjmp] fix setjmp test via naked fn attr (...

Nick Desaulniers via All-commits all-commits at lists.llvm.org
Tue Oct 15 10:40:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 66f968cf3725a9d3554765c900f9c2de75190a87
      https://github.com/llvm/llvm-project/commit/66f968cf3725a9d3554765c900f9c2de75190a87
  Author: Nick Desaulniers <nickdesaulniers at users.noreply.github.com>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

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

  Log Message:
  -----------
  [libc][setjmp] fix setjmp test via naked fn attr (#88054)

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.

Use `naked` function attribute to avoid function prolog/epilog.



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