Skip to content

bolt segfault on python aarch64 build #106935

Open
@belm0

Description

@belm0

This segfault is observed when building python 3.12 (seen on 3.12.4 and 3.12.5).

1336.7 BOLT-INFO: Target architecture: aarch64
1336.7 BOLT-INFO: BOLT version: e5def089cd9f5aa71524f82fef301ca66eaa38d2
1336.7 BOLT-INFO: first alloc address is 0x400000
1336.7 BOLT-INFO: enabling relocation mode
1336.7 BOLT-INFO: disabling -align-macro-fusion on non-x86 platform
1337.0 BOLT-INFO: pre-processing profile using branch profile reader
1338.2 BOLT-INFO: number of removed linker-inserted veneers: 0
1338.2 BOLT-INFO: 3957 out of 5934 functions in the binary (66.7%) have non-empty execution profile
1338.2 BOLT-INFO: 91 functions with profile could not be optimized
1338.2 BOLT-INFO: profile for 1 objects was ignored
1338.2 BOLT-INFO: removed 200 empty blocks
1338.3 BOLT-INFO: ICF folded 163 out of 6294 functions in 4 passes. 0 functions had jump tables.
1338.3 BOLT-INFO: Removing all identical functions will save 4.83 KB of code space. Folded functions were called 26607714 times based on profile.
1338.5 BOLT-INFO: ICP Total indirect calls = 481441560, 263 callsites cover 99% of all indirect calls
1338.6  #0 0x0000aaaac22c8c20 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt+0x1608c20)
1338.6  #1 0x0000aaaac22c6dc0 llvm::sys::RunSignalHandlers() (/root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt+0x1606dc0)
1338.6  #2 0x0000aaaac22c9478 SignalHandler(int) Signals.cpp:0:0
1338.6  #3 0x0000ffff84c417a0 (linux-vdso.so.1+0x7a0)
1338.6  #4 0x0000aaaac27171ac llvm::bolt::IndirectCallPromotion::rewriteCall(llvm::bolt::BinaryBasicBlock&, llvm::MCInst const&, std::vector<std::pair<llvm::MCSymbol*, std::vector<llvm::MCInst, std::allocator<llvm::MCInst>>>, std::allocator<std::pair<llvm::MCSymbol*, std::vector<llvm::MCInst, std::allocator<llvm::MCInst>>>>>&&, std::vector<llvm::MCInst*, std::allocator<llvm::MCInst*>> const&) const (/root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt+0x1a571ac)
1338.6  #5 0x0000aaaac271b124 llvm::bolt::IndirectCallPromotion::runOnFunctions(llvm::bolt::BinaryContext&) (/root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt+0x1a5b124)
1338.6  #6 0x0000aaaac2355d44 llvm::bolt::BinaryFunctionPassManager::runPasses() (/root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt+0x1695d44)
1338.6  #7 0x0000aaaac2359914 llvm::bolt::BinaryFunctionPassManager::runAllPasses(llvm::bolt::BinaryContext&) (/root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt+0x1699914)
1338.6  #8 0x0000aaaac2309410 llvm::bolt::RewriteInstance::run() (/root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt+0x1649410)
1338.6  #9 0x0000aaaac0fe18d0 main (/root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt+0x3218d0)
1338.6 #10 0x0000ffff84745e10 __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x20e10)
1338.6 #11 0x0000aaaac0fdfd68 _start (/root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt+0x31fd68)
1338.6 PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
1338.6 Stack dump:
1338.6 0.	Program arguments: /root/llvm-project/clang+llvm-18.1.8-aarch64-linux-gnu/bin/llvm-bolt python.prebolt -o python.bolt -data=python.fdata -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot
1338.6 Segmentation fault

Metadata

Metadata

Assignees

No one assigned

    Labels

    BOLTcrashPrefer [crash-on-valid] or [crash-on-invalid]

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions