about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/attributes.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-07-10 20:28:50 +0200
committerGitHub <noreply@github.com>2025-07-10 20:28:50 +0200
commit92f9480f8dee836eb38e34715e4a3fb3843ccadb (patch)
tree0f90f978df03916bbfb907f177dc0f69e8f7f38c /compiler/rustc_codegen_llvm/src/attributes.rs
parentb4089bf4178bc88ef7dc66e8e68e7d23f33dc85a (diff)
parent96cdbb9ba77b9a840a1637e4dab05bb2cc64fef0 (diff)
downloadrust-92f9480f8dee836eb38e34715e4a3fb3843ccadb.tar.gz
rust-92f9480f8dee836eb38e34715e4a3fb3843ccadb.zip
Rollup merge of #143651 - Fulgen301:seh-exception-ptr, r=ChrisDenton
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.

Fixes rust-lang/rust#143623.

This also happens to be the solution ``@dpaoliello`` suggested, though I'm not sure how to handle the commit credit attribution.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
0 files changed, 0 insertions, 0 deletions