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

Pass context when reading a compiled Structure or Array #27

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

MrYoranimo
Copy link
Contributor

@MrYoranimo MrYoranimo commented Feb 25, 2023

After allowing nested arrays in previous commits, only the parent type would have access to the context while resolving expressions in order to calculate their size.

This changeset updates the compiler so that other fields' values are passed as context so that sublevel arrays can also resolve their size from an expression correctly. A test has been written to verify this change.

After allowing nested arrays in previous commits, only the parent
type would have access to the context while resolving expressions.

This changeset updates the compiled so that other fields' values
are passed as context so that sublevel arrays can also resolve
their size from an expression correct. A test has been written
to verify this change.
@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Merging #27 (ef710a2) into main (f57fe5c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #27   +/-   ##
=======================================
  Coverage   88.03%   88.03%           
=======================================
  Files          20       20           
  Lines        1696     1696           
=======================================
  Hits         1493     1493           
  Misses        203      203           
Flag Coverage Δ
unittests 88.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
dissect/cstruct/compiler.py 96.37% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@Schamper Schamper left a comment

Choose a reason for hiding this comment

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

Good catch!

@Schamper Schamper merged commit 4d69954 into fox-it:main Feb 27, 2023
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

2 participants