You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.O-windowsOperating system: Windows
I'm building a 64k demo on windows so i'm building without std and without libc. When writing some code a reference to __CxxFrameHandler3 is emitted even though i'm building with panic=abort. I suspect this is because libcore is built with unwinding. In release builds the symbol __CxxFrameHandler3 is optimized away so the program links successfully. If i try to define __CxxFrameHandler3 i get an assertion failure in llvm.
I tried this code:
Build with rustc --crate-type bin -C panic=abort main.rs
I expected to see this happen:
Preferably the symbol __CxxFrameHandler3 would not be emitted. But being able to define it without a crash is ok as well.
Instead, this happened:
The symbol __CxxFrameHandler3 is emitted and when i try to define it i get a crash.
Current workaround is to pass /FORCE to the linker to ignore the unresolved symbol.
I haven't checked myself but the newish -Zbuild-std=core cargo flag might clear this up, assuming it really is a problem with libcore being compiled with unwinding.
Still actual - I tried to build a Windows kernel driver using a stable Rust and it failed due to unresolved __CxxFrameHandler3 in libcore for profile.dev.
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.O-windowsOperating system: Windows
I'm building a 64k demo on windows so i'm building without std and without libc. When writing some code a reference to
__CxxFrameHandler3
is emitted even though i'm building withpanic=abort
. I suspect this is because libcore is built with unwinding. In release builds the symbol__CxxFrameHandler3
is optimized away so the program links successfully. If i try to define__CxxFrameHandler3
i get an assertion failure in llvm.I tried this code:
Build with
rustc --crate-type bin -C panic=abort main.rs
I expected to see this happen:
Preferably the symbol
__CxxFrameHandler3
would not be emitted. But being able to define it without a crash is ok as well.Instead, this happened:
The symbol
__CxxFrameHandler3
is emitted and when i try to define it i get a crash.Current workaround is to pass
/FORCE
to the linker to ignore the unresolved symbol.Meta
rustc --version --verbose
:Output from rustc
Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!", file C:\bot\slave\nightly-dist-rustc-win-msvc-64\build\src\llvm\include\llvm/Support/Casting.h, line 237
Backtrace
The text was updated successfully, but these errors were encountered: