about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/attributes.rs
diff options
context:
space:
mode:
authorGeorge Tokmaji <tokmajigeorge@gmail.com>2025-07-08 21:19:38 +0200
committerGeorge Tokmaji <tokmajigeorge@gmail.com>2025-07-08 22:07:42 +0200
commit96cdbb9ba77b9a840a1637e4dab05bb2cc64fef0 (patch)
treeba48a6a79f79c5a7fb95ec95a32c5acd1b0ae106 /compiler/rustc_codegen_llvm/src/attributes.rs
parent040e2f8b9ff2d76fbe2146d6003e297ed4532088 (diff)
downloadrust-96cdbb9ba77b9a840a1637e4dab05bb2cc64fef0.tar.gz
rust-96cdbb9ba77b9a840a1637e4dab05bb2cc64fef0.zip
Win: Use exceptions with empty data for SEH panic exception copies
instead of a new panic

For unwinding with SEH, we currently construct a C++ exception with the
panic data. Being a regular C++ exception, it interacts with the C++
exception handling machinery and can be retrieved via
`std::current_exception`, which needs to copy the exception. We can't
support that, so we panic, which throws another exception, which the
C++ runtime tries to copy and store into the exception_ptr, which panics
again, which causes the C++ runtime to store a `bad_exception` instance.

However, this doesn't work because the panics thrown by the copy
function will be dropped without being rethrown, and causes unnecessary
log spam in stderr. Fix this by directly throwing an exception without
data, which doesn't cause log spam and can be dropped without being
rethrown.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
0 files changed, 0 insertions, 0 deletions