For empty sections, RuntimeDyld always allocates 1 byte but leaves it
uninitialized. This causes the contents of some output sections to be
non-deterministic.
Note that this issue is also solved by D147544.
Fixes #59008
Differential D149243
[BOLT] Make sure all section allocations have deterministic contents jobnoorman on Apr 26 2023, 1:29 AM. Authored by
Details For empty sections, RuntimeDyld always allocates 1 byte but leaves it Note that this issue is also solved by D147544. Fixes #59008
Diff Detail
Event TimelineComment Actions Do we want to hardcode RuntimeDyld's strange behavior of allocating 1 byte for empty sections in tests? This will break with D147544 because empty sections are actually allocated as empty.
Comment Actions LGTM. I think it's fine to omit the test case as an exception.
|
Could lead to surprising results if someone decides to allocate a section with one byte for whatever reason. I can't think of a much better alternative though, but let's add an assertion that we don't create a one-byte section.