Using -Z build-std-features=panic_immediate_abort
on Linux results in invalid executable.
#97602
Labels
C-bug
Category: This is a bug.
Cross-compiling windows executable on Linux ends with invalid executable if
-Z build-std-features=panic_immediate_abort
feature is used.I have reproduced it with GNU toolchain, and with Wine'd MSVC toolchain. Also I have reproduced it while compiling x32 and x64 targets. And it can be reproduced with
no_std
and ordinary project. But it seems it is not reproducible when windows is a compilation host.Cargo.toml:
When I compile with the following command:
the result is correct executable which could be normally executed and ends with error code 1 (as expected).
But if I compile the project with the following command:
then the result executable is not valid anymore. For example, a try to run it with wine ends with "Unhandled illegal instruction at address 004019A6 (thread 0024), starting debugger..." error.
The text was updated successfully, but these errors were encountered: