Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

perf2bolt: JumpTableBD->getEndAddress() <= UpperBound ERROR #151

Open
zpget opened this issue May 10, 2021 · 5 comments
Open

perf2bolt: JumpTableBD->getEndAddress() <= UpperBound ERROR #151

zpget opened this issue May 10, 2021 · 5 comments

Comments

@zpget
Copy link

zpget commented May 10, 2021

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.

@aaupov
Copy link
Contributor

aaupov commented May 10, 2021

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.

@zpget
Copy link
Author

zpget commented May 10, 2021

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

@yota9
Copy link
Contributor

yota9 commented May 10, 2021

@zpget Hello.
Will the -fno-reorder-blocks-and-partition flag make any difference?

@zpget
Copy link
Author

zpget commented May 10, 2021

@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.

@aaupov
Copy link
Contributor

aaupov commented May 11, 2021

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants