-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Miri reports possible UB in Body
#3015
Comments
This looks more serious than the issue talked about on irlo because afaict with a quick skim there is no |
I tested with |
Yeah, I also got to the same conclusion w/ Unpin. Maybe its something to do with https://docs.rs/aws-smithy-http/latest/src/aws_smithy_http/byte_stream.rs.html#501 copy_to_bytes? |
The |
Looks like its trigger in hyper's CI, an example appears in this job. The relevant output:
|
It's not clear this is actually a problem with I'll probably tag that test to be ignore in miri until it's clear there even is a problem, and how we can fix it (since otherwise, it's holding up CI for PRs that don't touch that code). cc @RalfJung |
If that started recently, it might be a different problem -- see rust-lang/unsafe-code-guidelines#381. You'll be able to tell once rust-lang/rust#105301 lands, which takes back some recent Miri changes to work around rust-lang/unsafe-code-guidelines#381 (this makes Miri unsound, but the UB Miri shows is not really actionable for crate authors anyway, that is something we need to first fix in the core language -- either by removing |
Does latest Miri still flag this code as UB? As mentioned in my previous comment there have been a bunch of changes in Miri around |
It seems like it passes in #3432 (some other spurious failure that seems unrelated...). |
Well, the tests that triggered this issue are re-enabled and passing now. So I'll close this :) |
Version
Hyper 0.14.20
Platform
Darwin bcd07430b6c3.ant.amazon.com 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64
Description
Recently, I was trying to run
miri
in our crates in smithy-rs and ran into a Miri failure (output below) for this test.I talked with @LucioFranco and he mentioned that the culprit is probably this
poll_fn
bug: https://internals.rust-lang.org/t/surprising-soundness-trouble-around-pollfn/17484/.In the context of hyper, it looks like it's specifically this line.
Related:
Testing
I ported our failing test into the hyper codebase here: #3014 in case it helps in diagnosing the problem.
Full miri report
The text was updated successfully, but these errors were encountered: