[llvm] [BOLT] Add validation for direct call/branch targets, bypassing invalid functions (PR #165406)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 05:55:25 PST 2025


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 590 tests passed
* 39 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### BOLT
<details>
<summary>BOLT.AArch64/constant-island-alignment.s</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/constant-island-alignment.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/constant-island-alignment.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp
# note: command had no output on stdout or stderr
# RUN: at line 8
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple aarch64-unknown-unknown    /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp/xword_align.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple aarch64-unknown-unknown /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp/xword_align.s -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.o
# note: command had no output on stdout or stderr
# RUN: at line 10
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang  --target=x86_64-unknown-linux-gnu -fPIE -fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -Wl,--build-id=none -pie --target=aarch64-unknown-linux-gnu -nostartfiles -nostdlib -ffreestanding -fPIC -pie /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.o -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.exe -Wl,-q     -nostartfiles -nodefaultlibs -Wl,-z,notext
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang --target=x86_64-unknown-linux-gnu -fPIE -fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -Wl,--build-id=none -pie --target=aarch64-unknown-linux-gnu -nostartfiles -nostdlib -ffreestanding -fPIC -pie /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.o -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.exe -Wl,-q -nostartfiles -nodefaultlibs -Wl,-z,notext
# note: command had no output on stdout or stderr
# RUN: at line 12
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.exe -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.bolt --use-old-text=0 --lite=0     --trap-old-code
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.exe -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.bolt --use-old-text=0 --lite=0 --trap-old-code
# .---command stdout------------
# | BOLT-INFO: shared object or position-independent executable detected
# | BOLT-INFO: Target architecture: aarch64
# | BOLT-INFO: BOLT version: 5778474eed1cc0b47c7fd3e7a28cc5b704ca67f8
# | BOLT-INFO: first alloc address is 0x0
# | BOLT-INFO: creating new program header table at address 0x200000, offset 0x200000
# | BOLT-INFO: enabling relocation mode
# | BOLT-WARNING: Running parallel work of 0 estimated cost, will switch to  trivial scheduling.
# | BOLT-INFO: MarkRAStates ran on 0 functions. Ignored 0 functions (-nan%) because of CFI inconsistencies
# | BOLT-INFO: number of removed linker-inserted veneers: 0
# | BOLT-INFO: 0 out of 3 functions in the binary (0.0%) have non-empty execution profile
# | BOLT-INFO: Starting stub-insertion pass
# | BOLT-INFO: Inserted 0 stubs in the hot area and 0 stubs in the cold area. Shared 0 times, iterated 1 times.
# | BOLT-WARNING: Running parallel work of 0 estimated cost, will switch to  trivial scheduling.
# | BOLT-INFO: rewritten pac-ret DWARF info in 0 out of 3 functions (0.00%).
# `-----------------------------
# .---command stderr------------
# | BOLT-WARNING: corrupted control flow detected in function _start, an internal branch/call targets an invalid instruction at address 0x10298
# | BOLT-INFO: no .got section found
# `-----------------------------
# RUN: at line 14
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d --disassemble-symbols='$d' /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.bolt | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/constant-island-alignment.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d '--disassemble-symbols=$d' /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.bolt
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump: warning: '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.bolt': failed to disassemble missing symbol $d
# `-----------------------------
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/constant-island-alignment.s
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/constant-island-alignment.s:57:10: error: CHECK: expected string not found in input
# | # CHECK: {{0|8}} <$d>:
# |          ^
# | <stdin>:1:1: note: scanning from here
# | 
# | ^
# | <stdin>:2:53: note: possible intended match here
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.bolt: file format elf64-littleaarch64
# |                                                     ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/constant-island-alignment.s
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1:  
# | check:57'0     X error: no match found
# |             2: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/constant-island-alignment.s.tmp_xa.bolt: file format elf64-littleaarch64 
# | check:57'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:57'1                                                         ?                                                                                                                   possible intended match
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the llvm-commits mailing list