We have mostly harmless data races when running
BinaryContext::calculateEmittedSize() in parallel, while performing
split function pass. However, it is possible to end up in a state
where some MCSymbols are still registered and our clean up
failed. This happens rarely but it does happen, and when it happens,
it is a difficult to diagnose heisenbug. To avoid this, change our
lowering pass to perform a last check on MCSymbols, before they
undergo our final emission pass, to verify that they are in a sane
state. If we fail to do this, we might resolve some symbols to zero
and crash the output binary.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Regarding testing: can we come up with some synthetic test with 1000s or millions of (non-zero) symbols and check their values after BOLT with forced split-functions?
Comment Actions
I mean leveraging altmacro to define a million functions with two basic blocks each, and force splitting them with split-functions=all.