Skip to content

[Clang][IPO] Binary inconsistency occurs when compiling for multiple times in ASLR self-enabled Clang. #86427

@dongjianqiang2

Description

@dongjianqiang2

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 ?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions