Skip to content

Reland "Make symbol table order deterministic (#1263)"#1432

Draft
quic-areg wants to merge 1 commit into
qualcomm:mainfrom
quic-areg:deterministic-symtab
Draft

Reland "Make symbol table order deterministic (#1263)"#1432
quic-areg wants to merge 1 commit into
qualcomm:mainfrom
quic-areg:deterministic-symtab

Conversation

@quic-areg

Copy link
Copy Markdown
Contributor

Multithreaded relocation scanning made the order in which symbols were appended to the module symbol vector dependent on thread timing. Both .dynsym and .symtab inherited that order: existing sorts had address ties everywhere, and stable_sort fell back to the unpredictable insertion order.

Sort each table deterministically by (input ordinal, input .symtab index).

Fixes #1261.

This relands 257cefc, which was reverted in 3e0b10c.

Multithreaded relocation scanning made the order in which symbols were
appended to the module symbol vector dependent on thread timing. Both
.dynsym and .symtab inherited that order: existing sorts had address
ties everywhere, and stable_sort fell back to the unpredictable insertion
order.

Sort each table deterministically by (input ordinal, input .symtab index).

Fixes qualcomm#1261.

This relands 257cefc, which was reverted
in 3e0b10c.

Signed-off-by: quic-areg <aregmi@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix non-deterministic order of entries in .dynsym

1 participant