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

Prevent mutation on cast of passed-by-reference bitfield l-value #279

Merged
merged 4 commits into from
Jul 13, 2024

Conversation

JonathanFoo0523
Copy link
Collaborator

Addresses an issue where implicit casts on bitfield l-values, subsequently passed by reference, are mutated. To prevent this, we check if the underlying value is a bitfield l-value and if the expression is a child of MaterializeTemporaryExpr. If both conditions are met, the mutation is avoided.

Fixes #259

@JonathanFoo0523 JonathanFoo0523 requested a review from afd July 13, 2024 12:20
Copy link
Member

@afd afd left a comment

Choose a reason for hiding this comment

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

Very nice - thanks for this!

@afd afd merged commit db675ae into mc-imperial:main Jul 13, 2024
9 checks passed
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.

Dredd incorrectly apply mutation to lvalue inside a function that expect lvalue
2 participants