BOLT
BOLT copied to clipboard
perf2bolt: JumpTableBD->getEndAddress() <= UpperBound ERROR
BOLT-ERROR:JumpTableBD->getEndAddress() <= UpperBound, address 0x44ac618 type:1 in function protobuf_common_5finfo_2eproto12_GLOBAL__N_126protobuf_AssignDescriptorsEv/1(2)3338perf2bolt: llvm/tools/llvm-bolt/src/BinaryContext.cpp:577: bool llvm::bolt::BinaryContext::analyzeJumpTable(uint64_t, llvm::bolt::JumpTable::JumpTableType, llvm::bolt::BinaryFunction&, uint64_t, llvm::bolt::JumpTable::OffsetsType): Assertion `JumpTableBD->getEndAddress() <= UpperBound && "data object cannot cross a section boundary"' failed.
Hi, can you please share steps for us to repro the issue? What’s the program you’re running perf2bolt on, the OS, which compiler is used with which options.
Hi, can you please share steps for us to repro the issue? What’s the program you’re running perf2bolt on, the OS, which compiler is used with which options.
self develop program x86_64 GNU/Linux gcc10, options are many : -msse3 -pipe -fPIC -Wextra -Wall -Wno-parentheses -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-deprecated-declarations -pthread -std=c++11 -fno-omit-frame-pointer -Werror=return-local-addr -Werror=return-type -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable
@zpget Hello. Will the -fno-reorder-blocks-and-partition flag make any difference?
@zpget Hello. Will the -fno-reorder-blocks-and-partition flag make any difference?
add -fno-reorder-blocks-and-partition remian the same core bolt:llvm/tools/llvm-bolt/src/BinaryContext.cpp:577: bool llvm::bolt::BinaryContext::analyzeJumpTable(uint64_t, llvm::bolt::JumpTable::JumpTableType, llvm::bolt::BinaryFunction&, uint64_t, llvm::bolt::JumpTable::OffsetsType*): Assertion `JumpTableBD->getEndAddress() <= UpperBound && "data object cannot cross a section boundary"' failed.
Thank you for more details! Thank you @yota9 for on-spot suggestion.
One thing I've noticed is that you don't have options to preserve relocations in the resulting binary.
Can you please add -Wl,--emit-relocs -znow
to you compilation flags and verify if the issue persists?