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
By default, Rust generates DWARF 4 debug info for maximum compatibility with various debuggers and other tools. If I create a new an empty Rust project and analyze it, BinSkim complains that I should be using DWARF 5:
$ cargo new --bin hello_world
$ cd hello_world
$ cargo build
...
$ ~/Downloads/microsoft.codeanalysis.binskim.2.0.0-rc2/tools/netcoreapp3.1/win-x64/BinSkim.exe analyze ./target/debug/hello_world
Analyzing...
hello_world: error BA3003: The stack protector was not found in 'hello_world'. This may be because '--stack-protector-strong' was not used, or because it was explicitly disabled by '-fno-stack-protectors'.
Modules did not meet the criteria: hello_world
hello_world: error BA3004: 'hello_world' is using debugging dwarf version '4'. The dwarf version 5 contains more information and should be used. To enable the debugging version 5 use '-gdwarf-5'.
Done. 1 files scanned.
Analysis completed successfully.
One or more rules was disabled for an analysis target, as it was determined not to be applicable to it (this is a common condition). Pass --verbose on the command-line for more information.
However, if I recompile and force the use of DWARF 5, BinSkim fails with an unhandled exception:
$ RUSTFLAGS="-Zdwarf-version=5" cargo +nightly build --target x86_64-unknown-linux-gnu -Zbuild-std
...
$ ~/Downloads/microsoft.codeanalysis.binskim.2.0.0-rc2/tools/netcoreapp3.1/win-x64/BinSkim.exe analyze ./target/x86_64-unknown-linux-gnu/debug/hello_world
Analyzing...
hello_world : error ERR997.ExceptionLoadingAnalysisTarget : Could not load analysis target 'hello_world'.
Done. 1 files scanned.
Analysis did not complete due to one or more unrecoverable execution conditions.
Unexpected fatal runtime condition(s) observed: ExceptionLoadingTargetFile
By default, Rust generates DWARF 4 debug info for maximum compatibility with various debuggers and other tools. If I create a new an empty Rust project and analyze it, BinSkim complains that I should be using DWARF 5:
However, if I recompile and force the use of DWARF 5, BinSkim fails with an unhandled exception:
Tested with
The text was updated successfully, but these errors were encountered: