Print a backtrace in const eval if interrupted#111769
Conversation
|
(rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
Yea, this is exactly what I wanted. Do any of the new deps have problematic licenses? Otherwise seems fine to just add them to the list of allowed crates. |
|
Jynn said Mark has previously been uncomfortable with signal handlers or atexit code, so I'd prefer Mark approve this before it goes in (got lucky with the random selection I suppose). |
Mark-Simulacrum
left a comment
There was a problem hiding this comment.
This seems broadly fine to me, my main concern here is that we don't write custom code where we need to be worried about signal safety etc to a great degree. But it seems like that's not being done here, which is good.
8666de9 to
a875a94
Compare
|
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
Just so everyone follows along, we recently added a mechanism like this to Miri: rust-lang/miri#2899 Since we |
You could do this change in this PR, subtrees ftw |
We should first push Miri changes to rustc though or else we'll get conflicts. |
a875a94 to
83d59c7
Compare
|
☔ The latest upstream changes (presumably #111867) made this pull request unmergeable. Please resolve the merge conflicts. |
83d59c7 to
f42df5f
Compare
|
The Miri subtree was changed cc @rust-lang/miri |
f42df5f to
cf2055b
Compare
|
r=me on the interpreter changes. Do we still need to get some approval for the new rustc dependencies? |
|
☔ The latest upstream changes (presumably #111933) made this pull request unmergeable. Please resolve the merge conflicts. |
cf2055b to
38a5fee
Compare
|
I'm happy to wait for @Mark-Simulacrum to swing by again and offer an opinion :) |
|
@bors r=RalfJung |
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
CI failed (because I added a dist job to CI) but the freebsd dist build finished, which is what held us up last time. I didn't want to put something in the bors queue that will just fail, because the queue is so busy right now. If this doesn't work, I'm just going to reimplement |
|
☔ The latest upstream changes (presumably #122283) made this pull request unmergeable. Please resolve the merge conflicts. |
|
There's been no changes to the actual code in this PR, other than bumping the ctrlc version. Let's try again. @bors r=RalfJung |
Cargo.lock
Outdated
| dependencies = [ | ||
| "cfg-if", | ||
| "windows-targets 0.52.4", | ||
| "windows-targets 0.48.5", |
There was a problem hiding this comment.
rebase mistake probably.
| /// `rustc_driver::main` installs a handler that will set this to `true` if | ||
| /// the compiler has been sent a request to shut down, such as by a Ctrl-C. | ||
| /// This static is placed here so that it is available to all parts of the compiler. | ||
| pub static CTRL_C_RECEIVED: AtomicBool = AtomicBool::new(false); |
There was a problem hiding this comment.
rustc_data_structures seems like a strange place to put this. You're using this in rustc_const_eval and rustc_driver_impl. rustc_driver_impl depends on rustc_const_eval. Can't you put the static into rustc_const_eval?
| fn run_threads(&mut self) -> InterpResult<'tcx, !> { | ||
| static SIGNALED: AtomicBool = AtomicBool::new(false); | ||
| // In normal rustc, rustc_driver::main installs this handler. But we don't use that | ||
| // function, see src/bin/miri.rs. |
There was a problem hiding this comment.
If this is a "thing the driver would do", then it probably makes more sense to install this in miri.rs than in the library.
There was a problem hiding this comment.
Probably. I factored the installation into a rustc_driver function that we call in miri.rs.
|
Sorry, I came up with some more questions in the ~10 months since I wrote the previous r=me. ;) |
|
@bors r- |
RalfJung
left a comment
There was a problem hiding this comment.
r=me with some last nits, but we'll have to figure out this approval for the new dependency
|
I meant to ask about all the new dependencies, not just the one. :)
|
|
☔ The latest upstream changes (presumably #122611) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Some changes occurred in run-make tests. cc @jieyouxu |
|
@bors r=RalfJung |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (c98ea0d): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 671.315s -> 675.795s (0.67%) |
|
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot) |
Demo: