Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Jun 5, 2025

Instead of pre-checking if the frame-pointer attribute is present,
just query the attribute and see if it's valid.

Instead of pre-checking if the frame-pointer attribute is present,
just query the attribute and see if it's valid.
@arsenm arsenm marked this pull request as ready for review June 5, 2025 05:37
Copy link
Contributor Author

arsenm commented Jun 5, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm merged commit 07a86a5 into main Jun 8, 2025
15 checks passed
@arsenm arsenm deleted the users/arsenm/codegen/fix-double-attr-lookup-frame-pointer branch June 8, 2025 14:03
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 8, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux running on sanitizer-buildbot8 while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/17577

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[182/186] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64-with-call.o
[183/186] Generating Msan-aarch64-with-call-Test
[184/186] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64.o
[185/186] Generating Msan-aarch64-Test
[185/186] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/interception/Unit' contained no tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/Unit' contained no tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:73: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 2923 of 5925 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40
FAIL: SanitizerCommon-msan-aarch64-Linux :: Posix/create_thread_loop.cpp (1318 of 2923)
******************** TEST 'SanitizerCommon-msan-aarch64-Linux :: Posix/create_thread_loop.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang  --driver-mode=g++ -gline-tables-only -fsanitize=memory   -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta  -funwind-tables  -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test -ldl -O3 -pthread /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/create_thread_loop.cpp -o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/create_thread_loop.cpp.tmp &&  /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/create_thread_loop.cpp.tmp 1000 # RUN: at line 3
+ /home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=memory -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -funwind-tables -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test -ldl -O3 -pthread /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/create_thread_loop.cpp -o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/create_thread_loop.cpp.tmp
+ /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/create_thread_loop.cpp.tmp 1000
MemorySanitizer:DEADLYSIGNAL
==3032360==ERROR: MemorySanitizer: SEGV on unknown address 0x600000a0d000 (pc 0xf0000aca2f5c bp 0xf00000a0d600 sp 0xf00000a0d600 T3032395)
==3032360==The signal is caused by a WRITE memory access.
    #0 0xf0000aca2f5c  (/lib/aarch64-linux-gnu/libc.so.6+0xa2f5c) (BuildId: 1d7249a4f207d07166ff4be43acdc68a01faaa04)
    #1 0xad697ac1a310 in __msan::SetShadow(void const*, unsigned long, unsigned char) /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/msan/msan_poisoning.cpp:215:9
    #2 0xad697ac1953c in __msan::MsanThread::ClearShadowForThreadStackAndTLS() /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/msan/msan_thread.cpp:30:3
    #3 0xad697ac196dc in __msan::MsanThread::Init() /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/msan/msan_thread.cpp:44:3
    #4 0xad697abbc65c in MsanThreadStartFunc(void*) /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1155:6
    #5 0xf0000ac85958  (/lib/aarch64-linux-gnu/libc.so.6+0x85958) (BuildId: 1d7249a4f207d07166ff4be43acdc68a01faaa04)
    #6 0xf0000aceba48  (/lib/aarch64-linux-gnu/libc.so.6+0xeba48) (BuildId: 1d7249a4f207d07166ff4be43acdc68a01faaa04)

==3032360==Register values:
 x0 = 0x0000600000a0d000   x1 = 0x0000000000000000   x2 = 0x0000000000000f60   x3 = 0x0000600000a0d000  
 x4 = 0x0000600000a0df60   x5 = 0x0000000000c00000   x6 = 0x0000000032333033   x7 = 0x0000000000000007  
 x8 = 0x0000f0000aca2ec0   x9 = 0x0000000000000003  x10 = 0xffff1bffffffffff  x11 = 0x00000000000000a0  
x12 = 0x0000f00000a0d680  x13 = 0x0000000000000035  x14 = 0x0000000002f112ed  x15 = 0x0000000000000000  
x16 = 0x0000000000000001  x17 = 0x0000ad697abaf344  x18 = 0x0000000000000007  x19 = 0x00005fffffe10000  
x20 = 0x0000000000bfd000  x21 = 0x0000000000bfdf60  x22 = 0x00005fffffe10000  x23 = 0x0000600000a0d000  
x24 = 0x0000000000001000  x25 = 0xfffffffffffff000  x26 = 0x0000600000a0df60  x27 = 0x0000f0000b1c1020  
x28 = 0x0000efffffe00000   fp = 0x0000f00000a0d600   lr = 0x0000ad697ac1a314   sp = 0x0000f00000a0d600  
MemorySanitizer can not provide additional info.
SUMMARY: MemorySanitizer: SEGV (/lib/aarch64-linux-gnu/libc.so.6+0xa2f5c) (BuildId: 1d7249a4f207d07166ff4be43acdc68a01faaa04) 
==3032360==ABORTING

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 

2 warning(s) in tests
Step 11 (test compiler-rt debug) failure: test compiler-rt debug (failure)
...
[182/186] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64-with-call.o
[183/186] Generating Msan-aarch64-with-call-Test
[184/186] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64.o
[185/186] Generating Msan-aarch64-Test
[185/186] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/interception/Unit' contained no tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/Unit' contained no tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:73: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 2923 of 5925 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40
FAIL: SanitizerCommon-msan-aarch64-Linux :: Posix/create_thread_loop.cpp (1318 of 2923)
******************** TEST 'SanitizerCommon-msan-aarch64-Linux :: Posix/create_thread_loop.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang  --driver-mode=g++ -gline-tables-only -fsanitize=memory   -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta  -funwind-tables  -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test -ldl -O3 -pthread /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/create_thread_loop.cpp -o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/create_thread_loop.cpp.tmp &&  /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/create_thread_loop.cpp.tmp 1000 # RUN: at line 3
+ /home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=memory -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -funwind-tables -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test -ldl -O3 -pthread /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/create_thread_loop.cpp -o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/create_thread_loop.cpp.tmp
+ /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/create_thread_loop.cpp.tmp 1000
MemorySanitizer:DEADLYSIGNAL
==3032360==ERROR: MemorySanitizer: SEGV on unknown address 0x600000a0d000 (pc 0xf0000aca2f5c bp 0xf00000a0d600 sp 0xf00000a0d600 T3032395)
==3032360==The signal is caused by a WRITE memory access.
    #0 0xf0000aca2f5c  (/lib/aarch64-linux-gnu/libc.so.6+0xa2f5c) (BuildId: 1d7249a4f207d07166ff4be43acdc68a01faaa04)
    #1 0xad697ac1a310 in __msan::SetShadow(void const*, unsigned long, unsigned char) /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/msan/msan_poisoning.cpp:215:9
    #2 0xad697ac1953c in __msan::MsanThread::ClearShadowForThreadStackAndTLS() /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/msan/msan_thread.cpp:30:3
    #3 0xad697ac196dc in __msan::MsanThread::Init() /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/msan/msan_thread.cpp:44:3
    #4 0xad697abbc65c in MsanThreadStartFunc(void*) /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1155:6
    #5 0xf0000ac85958  (/lib/aarch64-linux-gnu/libc.so.6+0x85958) (BuildId: 1d7249a4f207d07166ff4be43acdc68a01faaa04)
    #6 0xf0000aceba48  (/lib/aarch64-linux-gnu/libc.so.6+0xeba48) (BuildId: 1d7249a4f207d07166ff4be43acdc68a01faaa04)

==3032360==Register values:
 x0 = 0x0000600000a0d000   x1 = 0x0000000000000000   x2 = 0x0000000000000f60   x3 = 0x0000600000a0d000  
 x4 = 0x0000600000a0df60   x5 = 0x0000000000c00000   x6 = 0x0000000032333033   x7 = 0x0000000000000007  
 x8 = 0x0000f0000aca2ec0   x9 = 0x0000000000000003  x10 = 0xffff1bffffffffff  x11 = 0x00000000000000a0  
x12 = 0x0000f00000a0d680  x13 = 0x0000000000000035  x14 = 0x0000000002f112ed  x15 = 0x0000000000000000  
x16 = 0x0000000000000001  x17 = 0x0000ad697abaf344  x18 = 0x0000000000000007  x19 = 0x00005fffffe10000  
x20 = 0x0000000000bfd000  x21 = 0x0000000000bfdf60  x22 = 0x00005fffffe10000  x23 = 0x0000600000a0d000  
x24 = 0x0000000000001000  x25 = 0xfffffffffffff000  x26 = 0x0000600000a0df60  x27 = 0x0000f0000b1c1020  
x28 = 0x0000efffffe00000   fp = 0x0000f00000a0d600   lr = 0x0000ad697ac1a314   sp = 0x0000f00000a0d600  
MemorySanitizer can not provide additional info.
SUMMARY: MemorySanitizer: SEGV (/lib/aarch64-linux-gnu/libc.so.6+0xa2f5c) (BuildId: 1d7249a4f207d07166ff4be43acdc68a01faaa04) 
==3032360==ABORTING

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

2 warning(s) in tests

tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
Instead of pre-checking if the frame-pointer attribute is present,
just query the attribute and see if it's valid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants