Prevent aborting guard from aborting the process in a forced unwind#104070
Prevent aborting guard from aborting the process in a forced unwind#104070bors merged 7 commits intorust-lang:masterfrom
Conversation
|
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
|
☔ The latest upstream changes (presumably #101168) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
What is the difference between cleanup and filter? How should a backend implement it?
There was a problem hiding this comment.
It's purely metadata in LSDA. https://itanium-cxx-abi.github.io/cxx-abi/exceptions.pdf
A negative value in action record means filter, a positive value means catch, and zero (or absence of action record) means cleanup.
There was a problem hiding this comment.
This corresponds to section 7.5 "Exception Specification" of that document?
There was a problem hiding this comment.
Yeah. I call it filter because that's how LLVM calls it.
The code here doesn't actually specify any exceptions (corresponds to C++ throw()), so it's essentially catch-all. But it provides a way for the personality function to distinguish terminate vs cleanup.
|
Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
r? @Amanieu |
994b4a4 to
8e349db
Compare
There was a problem hiding this comment.
The proper way to encode this in GCC would be <<<eh_filter (NULL)>>> (or even better, <<<eh_must_not_throw (terminate)>>>, which is something we hoped for for LLVM!). But I don't think there is support in libgccjit yet, @antoyo to confirm?
There was a problem hiding this comment.
Yeah, I'll take care of this. I'm not done with supporting unwinding yet.
But, please add a // TODO(antoyo): generate the correct landing pad.
For my personal information, what are <<<eh_filter (NULL)>>> and <<<eh_must_not_throw (terminate)>>>? I've never seen this syntax. Are they C attributes?
I don't remember exactly what filter is doing, but the proper implementation of this method might be very similar as cleanup_landing_pad, but without adding to self.cleanup_blocks.
There was a problem hiding this comment.
These are part of generic/gimple: https://godbolt.org/z/5adjbahnd
|
r=me after double-checking the GCC changes with @antoyo. |
|
@bors r+ |
|
📌 Commit 368cf88fbedf18ef2789acabbe80747c9529a555 has been approved by It is now in the queue for this repository. |
|
⌛ Testing commit 368cf88fbedf18ef2789acabbe80747c9529a555 with merge 5a90fe78cc076aca81d61b2c0f06c7e666aef04c... |
|
💔 Test failed - checks-actions |
There was a problem hiding this comment.
It would be nice to have a Windows version of this test that uses longjmp. On Windows longjmp is implemented using SEH exceptions and effectively acts like a forced unwind.
|
@bors r+ |
|
📌 Commit 5516791017a61acc9e5b1964accc8775bc340abe has been approved by It is now in the queue for this repository. |
|
⌛ Testing commit 5516791017a61acc9e5b1964accc8775bc340abe with merge 08c382f09932d3d0b04871bb834f68d59ffc8bb3... |
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
|
Somehow a commit from my other (already merged) PR was mixed in. Fixed |
|
@bors r+ |
…mpiler-errors Rollup of 6 pull requests Successful merges: - rust-lang#104070 (Prevent aborting guard from aborting the process in a forced unwind) - rust-lang#109410 (Introduce `AliasKind::Inherent` for inherent associated types) - rust-lang#111004 (Migrate `mir_transform` to translatable diagnostics) - rust-lang#111118 (Suggest struct when we get colon in fileds in enum) - rust-lang#111170 (Diagnostic args are still args if they're documented) - rust-lang#111354 (Fix miscompilation when calling default methods on `Future`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fix #101469