Skip to content

Conversation

@philipc
Copy link
Contributor

@philipc philipc commented Jul 29, 2025

A single dependency graph indexed by gimli::UnitSectionOffset was used to contain the dependencies from every gimli::Dwarf. However, this is not correct because a gimli::UnitSectionOffset is only unique within its associated gimli::Dwarf.

Fix by using one graph per gimli::Dwarf.

In addition to wasmtime's tests, the only testing I have done on this is to compile the component-docs tutorial using wasmtime and diff the resulting DWARF. That diff showed that this patch does affect which DWARF entries are determined to be reachable.

A single dependency graph indexed by `gimli::UnitSectionOffset` was used
to contain the dependencies from every `gimli::Dwarf`. However, this is not
correct because a `gimli::UnitSectionOffset` is only unique within its
associated `gimli::Dwarf`.

Fix by using one graph per `gimli::Dwarf`.
@philipc philipc requested a review from a team as a code owner July 29, 2025 05:36
@philipc philipc requested review from alexcrichton and removed request for a team July 29, 2025 05:36
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexcrichton alexcrichton added this pull request to the merge queue Jul 29, 2025
Merged via the queue into bytecodealliance:main with commit 4a722b8 Jul 29, 2025
43 checks passed
@philipc philipc deleted the dwarf-reachable branch July 29, 2025 22:17
bongjunj pushed a commit to prosyslab/wasmtime that referenced this pull request Oct 20, 2025
A single dependency graph indexed by `gimli::UnitSectionOffset` was used
to contain the dependencies from every `gimli::Dwarf`. However, this is not
correct because a `gimli::UnitSectionOffset` is only unique within its
associated `gimli::Dwarf`.

Fix by using one graph per `gimli::Dwarf`.
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.

2 participants