Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read: don't use rnglists and loclists header #370

Merged
merged 2 commits into from
Feb 1, 2019

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Jan 31, 2019

These headers don't give information that is required for parsing
range lists or location lists, because the encoding of these lists
must match the encoding of the compilation unit.

Additionally, while the standard seems to indicate that each section
has only one of these headers, in practice this is not true.
Furthermore, when there are multiple headers, they do not have to
each have the same encoding, so our parsing was wrong in this case
because we only used the encoding from the first header.

@philipc philipc requested a review from fitzgen January 31, 2019 02:39
@coveralls
Copy link

coveralls commented Jan 31, 2019

Coverage Status

Coverage decreased (-0.07%) to 87.185% when pulling 1f473fd on philipc:ranges into 6e16ab6 on gimli-rs:master.

@philipc
Copy link
Collaborator Author

philipc commented Jan 31, 2019

Also use one RangeListTable per unit when writing, since units can have different encodings, and so the range list tables must too.

src/read/loclists.rs Outdated Show resolved Hide resolved
These headers don't give information that is required for parsing
range lists or location lists, because the encoding of these lists
must match the encoding of the compilation unit.

Additionally, while the standard seems to indicate that each section
has only one of these headers, in practice this is not true.
Furthermore, when there are multiple headers, they do not have to
each have the same encoding, so our parsing was wrong in this case
because we only used the encoding from the first header.
This allows units with differing encodings.
@philipc philipc merged commit c679a14 into gimli-rs:master Feb 1, 2019
@philipc philipc deleted the ranges branch February 1, 2019 05:19
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.

None yet

3 participants