llvm-project
llvm-project copied to clipboard
[Clang][IPO] Binary inconsistency occurs when compiling for multiple times in ASLR self-enabled Clang.
Hi Can clang enable -fPIE by itself? I found that when compiling with -fPIE enabled Clang and the EnableHotColdSplit optimization is enabled, Clang compiles the source file multiple times, and the binary is inconsistent. After debugging by BB printing, the function trace is extractColdRegion->extractCodeRegion->severSplitPHINodesOfExits severSplitPHINodesOfExits the ExitBB in severSplitPHINodesOfExits is inconsistent, which is from parameter Exits. From function extractCodeRegion, the declaration is SmallPtrSet<BasicBlock *, 1> ExitBlocks; ExitBlocks insert Due to the ASLR self-enabled Clang., the BasicBlock address is not fixed. As a result, the Exits traversal is not fixed ?