Cranelift: consider heap's guard pages when legalizing heap_addr#5335
Cranelift: consider heap's guard pages when legalizing heap_addr#5335fitzgen merged 3 commits intobytecodealliance:mainfrom
heap_addr#5335Conversation
|
FWIW, I looked this over and I think it makes sense, but I'd definitely prefer to have somebody else's review on it. |
cfallin
left a comment
There was a problem hiding this comment.
Looks correct to me. One note below on possibly expanding the explanation a bit.
alexcrichton
left a comment
There was a problem hiding this comment.
It looks like the prior PR accidentally enabled bounds checks by default in Wasmtime, so I'm sort of surprised we didn't catch that until now. Does sightglass show regressions here or improvements after this commit? If so it might be good to use sightglass on future changes to heap_{addr,store,load} to double-check the intended effect.
Yeah would be great if we had nightly sightglass benchmarks set up. I set up some smoke tests for Sightglass results for this PR: |
|
Nah I don't think it's worthwhile to add more than what's already here given that this is all intended to be short-lived anyway. It's good though that sightglass clearly detects this either way! |
Fixes #5328
FYI, I opted not to mess with or dedupe the similar logic in
cranelift-wasmsince that stuff is going to go away soon-ish when we removeheap_addrand collect all this logic intoheap_{load,store}. Excited to get to a point where this logic isn't spread across crates and straddling interfaces.