Skip to content

effects: don't taint :noub for :new allocations #52222

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

Merged
merged 1 commit into from
Nov 19, 2023
Merged

effects: don't taint :noub for :new allocations #52222

merged 1 commit into from
Nov 19, 2023

Conversation

aviatesk
Copy link
Member

After #52169, the UB previously associated with allocations with uninitialized fields has been addressed, so there's no longer a need to taint :noub for :new allocations during abstract interpretation.

I believe, even without #52169, uninitialized field does not inherently leads to UB, but just causes inconsistency of the program, since what actually causes UB is getfield that accesses into whatever object, but not the allocation itself.

After #52169, the UB previously associated with allocations with
uninitialized fields has been addressed, so there's no longer a need to
taint `:noub` for `:new` allocations during abstract interpretation.

I believe, even without #52169, uninitialized field does not inherently
leads to UB, but just causes inconsistency of the program, since what
actually causes UB is `getfield` that accesses into whatever object,
but not the allocation itself.
@aviatesk aviatesk requested review from vtjnash and Keno November 18, 2023 08:58
@Keno
Copy link
Member

Keno commented Nov 18, 2023

I believe, even without #52169, uninitialized field does not inherently leads to UB, but just causes inconsistency of the program, since what actually causes UB is getfield that accesses into whatever object, but not the allocation itself.

This is correct, but LLVM is only exploiting the UB if it sees both the allocation and the access, so tainting the allocation was an easy way to catch all the relevant cases, but that is moot now of course.

@Keno Keno merged commit f5d189f into master Nov 19, 2023
@Keno Keno deleted the avi/alloc-noub branch November 19, 2023 15:50
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