-
Notifications
You must be signed in to change notification settings - Fork 347
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
Rustup #445
Conversation
I had to make the pointer equality a bit smarter: When comparing a really big integer with a pointer that cannot possibly be so big or else the allocation would wrap around the end of the address space, we also say these are inequal. This is needed for |
src/operator.rs
Outdated
// Compute the highest address at which this allocation could live | ||
let alloc = self.memory.get(ptr.alloc_id)?; | ||
let max_base_addr = | ||
(1u128 << self.pointer_size().bits()) - alloc.bytes.len() as u128; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for alignment > 1 this could be even more permissive, right?
src/operator.rs
Outdated
// The integer is too big, this cannot possibly be equal | ||
false | ||
} else { | ||
// TODO: We could also take alignment into account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, you already added a todo, ignore my above comment
Since you clearly took a look and had no reservations, I assume I can merge once CI is green? |
Updates for rust-lang/rust#53779
Functional changes: