-
Notifications
You must be signed in to change notification settings - Fork 353
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
Implement align_offset
intrinsic and thus enabling from_utf8
#324
Conversation
So I guess we'll need to do a pass through |
Yes. I'll be rerunning miri on the rust test suite to figure out which places are relevant. For now this PR is blocked on @eddyb's fix for promoteds inside statics. |
Yeah, master is currently red. Got a link for that? |
Nope. No PR open yet. Discussion is here |
Better StorageLive / StorageDead placement for constants. Fixes problems in miri (see rust-lang/miri#324 (comment)) caused by the new scope rules in #43932. What I've tried to do here is always have a `StorageLive` but no `StorageDead` for `'static` slots. It might not work perfectly in all cases, but it should unblock miri. r? @nikomatsakis cc @oli-obk
rust-lang/rust#44252 merged, next nightly should be fixed. |
It's not great that we will never execute the "aligned" loop of code using this -- if there's bad things going on there, miri will not notice. But I guess there's not too much we can do. |
We can improve the intrinsic to work if the alignment of the allocation is bigger than 1. Then we can allocate some bytes but with a high alignment and run the utf8 checks on that memory |
Yeah that would help for this, but not in general for other uses of the intrinsic. |
Right. For that we'll need the intptrcast model |
fixes #190