[llvm] [BOLT] Abort on out-of-section symbols in GOT (PR #100801)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 16:22:25 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `bolt-x86_64-ubuntu-nfc` running on `bolt-worker` while building `bolt` at step 9 "test-build-bolt-check-large-bolt".

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

Here is the relevant piece of the build log for the reference:
```
Step 9 (test-build-bolt-check-large-bolt) failure: test (failure)
******************** TEST 'bolt-tests :: X86/clang7-pic.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 6: mkdir -p /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output
+ mkdir -p /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output
RUN: at line 7: test -f /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic ||     unzstd /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Inputs/clang-7.pic.zst -o /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic
+ test -f /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic
RUN: at line 9: test -f /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic.fdata ||     unzstd /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Inputs/clang-7.pic.fdata.zst -o /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic.fdata
+ test -f /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic.fdata
RUN: at line 11: /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/bin/llvm-bolt /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic -o /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/tools/bolttests/X86/Output/clang7-pic.test.tmp -data /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic.fdata     -relocs -reorder-blocks=ext-tsp -split-functions=3 -split-all-cold     -split-eh -icf=1 -reorder-functions=hfsort+ -use-gnu-stack     -jump-tables=aggressive -frame-opt=hot -strict     | /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/bin/FileCheck /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/clang7-pic.test --check-prefix=CHECK-STRICT
+ /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/bin/llvm-bolt /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic -o /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/tools/bolttests/X86/Output/clang7-pic.test.tmp -data /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic.fdata -relocs -reorder-blocks=ext-tsp -split-functions=3 -split-all-cold -split-eh -icf=1 -reorder-functions=hfsort+ -use-gnu-stack -jump-tables=aggressive -frame-opt=hot -strict
+ /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/bin/FileCheck /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/clang7-pic.test --check-prefix=CHECK-STRICT
BOLT-WARNING: specifying non-boolean value "3" for option -split-functions is deprecated
BOLT-WARNING: '-reorder-functions=hfsort+' is deprecated, please use '-reorder-functions=cdsort' instead
llvm-bolt: /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/llvm-project/bolt/lib/Rewrite/RewriteInstance.cpp:2868: void llvm::bolt::RewriteInstance::handleRelocation(const llvm::object::SectionRef&, const llvm::object::RelocationRef&): Assertion `(IsAArch64 || BC->isRISCV() || IsSectionRelocation || BC->getSectionNameForAddress(SymbolAddress)->starts_with(".plt")) && "known symbols should not resolve to anonymous locals"' failed.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  llvm-bolt 0x00005635c5f01770
1  llvm-bolt 0x00005635c5efed9f
2  llvm-bolt 0x00005635c5efeef5
3  libc.so.6 0x00007f8612242520
4  libc.so.6 0x00007f86122969fc pthread_kill + 300
5  libc.so.6 0x00007f8612242476 raise + 22
6  libc.so.6 0x00007f86122287f3 abort + 211
7  libc.so.6 0x00007f861222871b
8  libc.so.6 0x00007f8612239e96
9  llvm-bolt 0x00005635c5fc6fff
10 llvm-bolt 0x00005635c5fc775e
11 llvm-bolt 0x00005635c5fc7a0f
12 llvm-bolt 0x00005635c5fcb025
13 llvm-bolt 0x00005635c5fec4a5
14 llvm-bolt 0x00005635c5215aed
15 libc.so.6 0x00007f8612229d90
16 libc.so.6 0x00007f8612229e40 __libc_start_main + 128
17 llvm-bolt 0x00005635c52be195
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/bin/llvm-bolt /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic -o /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/tools/bolttests/X86/Output/clang7-pic.test.tmp -data /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/clang-7.pic.fdata -relocs -reorder-blocks=ext-tsp -split-functions=3 -split-all-cold -split-eh -icf=1 -reorder-functions=hfsort+ -use-gnu-stack -jump-tables=aggressive -frame-opt=hot -strict
/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/clang7-pic.test:19:15: error: CHECK-STRICT: expected string not found in input
CHECK-STRICT: BOLT-INFO: 14724 out of 59493 functions in the binary (24.7%) have non-empty execution profile
              ^
<stdin>:1:1: note: scanning from here
BOLT-INFO: Target architecture: x86_64
^

Input file: <stdin>
Check file: /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/clang7-pic.test

-dump-input=help explains the following input dump.
...
Step 13 (nfc-check-large-bolt) failure: NFC check-large-bolt completed (failure)
******************** TEST 'bolt-tests :: X86/openssl.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 10: mkdir -p /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output
+ mkdir -p /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output
RUN: at line 11: test -f /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/openssl || unzstd /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Inputs/openssl.zst -o /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/openssl
+ test -f /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/openssl
RUN: at line 14: /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/bin/llvm-bolt /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/openssl -o /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/tools/bolttests/X86/Output/openssl.test.tmp.exe --pa -p /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Inputs/openssl.preagg.txt    -reorder-blocks=ext-tsp -peepholes=all -dyno-stats -enable-bat    -split-functions -split-all-cold -split-eh -icf    -reorder-functions=cdsort -use-gnu-stack -jump-tables=move -frame-opt=hot    -print-cfg -print-only=bn_mul4x_mont.*,__memcpy_evex_unaligned_erms.*,BN_BLINDING_convert_ex    |& /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/bin/FileCheck /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/openssl.test -check-prefix=CHECK-BOLT-BAT
+ /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/bin/llvm-bolt /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Output/openssl -o /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/tools/bolttests/X86/Output/openssl.test.tmp.exe --pa -p /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/Inputs/openssl.preagg.txt -reorder-blocks=ext-tsp -peepholes=all -dyno-stats -enable-bat -split-functions -split-all-cold -split-eh -icf -reorder-functions=cdsort -use-gnu-stack -jump-tables=move -frame-opt=hot -print-cfg '-print-only=bn_mul4x_mont.*,__memcpy_evex_unaligned_erms.*,BN_BLINDING_convert_ex'
+ /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/bin/FileCheck /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/openssl.test -check-prefix=CHECK-BOLT-BAT
/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/openssl.test:22:17: error: CHECK-BOLT-BAT: expected string not found in input
CHECK-BOLT-BAT: Binary Function "bn_mul4x_mont/1(*2)" after building cfg {
                ^
<stdin>:1:1: note: scanning from here
/tmp/lit-tmp-3toe3ax5/tmpudsxlzn4
^

Input file: <stdin>
Check file: /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/bolt-tests/test/X86/openssl.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: /tmp/lit-tmp-3toe3ax5/tmpudsxlzn4 
check:22     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
          2: exitcode mismatch 
check:22     ~~~~~~~~~~~~~~~~~~
>>>>>>

--

********************


```

https://github.com/llvm/llvm-project/pull/100801


More information about the llvm-commits mailing list