-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
const_prop makes RUST_CTFE_BACKTRACE unusable #63439
Comments
Well. Const prop tries to eval things and if it fails it doesn't prop. The reason why there are many errors now is that we are actually using the interpcx instead of reimplementing its logic |
I'm not sure how to reduce your noise. Maybe we can disable the env var before const prop and reenable after? |
If that was fixed, things would still be slow because so many backtraces are captured, but at least the result should be readable. |
The really fancy solution, but probably too magic, would be to determine if we are running inside a const_prop query and let that alter the behavior. AFAIK rustc uses thread-local storage so this could actually be done, but it might not be how that TLS is supposed to be used. |
@oli-obk my guess is that the printing originates here: rust/src/librustc_mir/transform/const_prop.rs Line 258 in 6f70adc
|
The idea behind
RUST_CTFE_BACKTRACE=1
was that it should only show a backtrace (of where a Miri error originates) when an error is actually shown to the user. And that worked fine when I implemented it. But since then, something changed in const_prop, and now I get thousands of backtraces even for crates with no errors, making the env var basically unusable. That is a big problem for debugging of the Miri engine.Even
RUST_CTFE_BACKTRACE=immediate
shouldn't show so many errors, but that will be harder to do for const_prop which runs the CTFE engine on broken and non-monomorphized MIR (causing tons of problems, not just this).@oli-obk @wesleywiser AFAIK you did a bunch of const_prop changes over the last few weeks/months; likely some of what you did is the culprit here. Any ideas?
The text was updated successfully, but these errors were encountered: