Repository: rust
Issue: [ICE]: cargo build release fails
Labels: O-windows,I-ICE,T-compiler,C-bug

I'm on nightly (cargo 1.54.0-nightly (070e459c2 2021-05-11). I attempted to use lld-link.exe from https://prereleases.llvm.org/win-snapshots/LLVM-12.0.0-6923b0a7-win64.exe to build the project in release mode. I originally switched to lld-link because the same project caused msvc's link.exe to throw an access_violation also only in the release build. Debug works fine with both linkers. Here's the project, it's a no_std windows driver with barebones logic for a wasm interpreter that's also no_std. There's some linker flags in the .cargo/config to specify the necessary windows driver link options, i haven't verified if these are correct for lld yet:

[RSTrace.zip](https://github.com/rust-lang/rust/files/6512059/RSTrace.zip)

## lld ICE:
```
PS C:\Users\steve\source\repos\RSTrace> cargo build --release --verbose
warning: file found to be present in multiple build targets: C:\Users\steve\source\repos\RSTrace\src\main.rs
warning: output filename collision.
The bin target `RSTrace` in package `RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)` has the same output filename as the lib target `RSTrace` in package `RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)`.
Colliding filename is: C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\RSTrace.pdb
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
warning: output filename collision.
The bin target `RSTrace` in package `RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)` has the same output filename as the lib target `RSTrace` in package `RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)`.
Colliding filename is: C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\RSTrace.pdb
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
       Fresh autocfg v1.0.1
       Fresh unicode-xid v0.2.2
       Fresh cc v1.0.67
       Fresh adler v1.0.2
       Fresh gimli v0.24.0
       Fresh rustc-demangle v0.1.19
       Fresh object v0.24.0
       Fresh cfg-if v1.0.0
       Fresh parity-wasm v0.41.0
       Fresh memory_units v0.3.0
       Fresh downcast-rs v1.2.0
       Fresh kernel-alloc v0.1.0
       Fresh addr2line v0.15.1
       Fresh proc-macro2 v1.0.26
       Fresh wasmi-validation v0.3.0
       Fresh quote v1.0.9
       Fresh miniz_oxide v0.4.4
       Fresh num-traits v0.2.14
       Fresh winapi v0.3.9
       Fresh libc v0.2.94
       Fresh syn v1.0.72
       Fresh backtrace v0.3.59
       Fresh num-integer v0.1.44
       Fresh winreg v0.7.0
       Fresh ntapi v0.3.6
       Fresh libm v0.2.1
       Fresh synstructure v0.12.4
       Fresh num-rational v0.2.4
       Fresh kernel-print v0.1.0
       Fresh failure_derive v0.1.8
       Fresh wasmi v0.8.0
       Fresh failure v0.1.8
   Compiling RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)
     Running `rustc --crate-name RSTrace --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=23744fd5c77e06ca --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern kernel_alloc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_alloc-a8e329f31ad78fcc.rlib --extern kernel_print=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_print-e268efe24f0105ac.rlib --extern libc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\liblibc-b99fd5bfef188159.rlib --extern wasmi=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libwasmi-0d527adc8b1e3172.rlib -C panic=abort -C linker=lld-link.exe -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry -L "native=C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\km\x64"`
     Running `rustc --crate-name RSTrace --edition=2018 src\main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=6f336c8d04ae004b --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern kernel_alloc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_alloc-a8e329f31ad78fcc.rlib --extern kernel_print=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_print-e268efe24f0105ac.rlib --extern libc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\liblibc-b99fd5bfef188159.rlib --extern wasmi=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libwasmi-0d527adc8b1e3172.rlib -C panic=abort -C linker=lld-link.exe -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry -L "native=C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\km\x64"`
warning: unused import: `Module`
   --> src\main.rs:190:29
    |
190 | use wasmi::{ImportsBuilder, Module, ModuleInstance, NopExternals, RuntimeValue};
    |                             ^^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default

warning: unused import: `Module`
   --> src/main.rs:190:29
    |
190 | use wasmi::{ImportsBuilder, Module, ModuleInstance, NopExternals, RuntimeValue};
    |                             ^^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default

warning: crate `RSTrace` should have a snake case name
  |
  = note: `#[warn(non_snake_case)]` on by default
  = help: convert the identifier to snake case: `rstrace`

warning: unused attribute
 --> src/main.rs:2:1
  |
2 | #![no_main]
  | ^^^^^^^^^^^
  |
  = note: `#[warn(unused_attributes)]` on by default

warning: crate-level attribute should be in the root module
 --> src/main.rs:2:1
  |
2 | #![no_main]
  | ^^^^^^^^^^^

warning: crate `RSTrace` should have a snake case name
  |
  = note: `#[warn(non_snake_case)]` on by default
  = help: convert the identifier to snake case: `rstrace`

warning: unused `Result` that must be used
   --> src\main.rs:202:5
    |
202 |     main.invoke_export("_call", &[RuntimeValue::I32(1)], &mut NopExternals);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: this `Result` may be an `Err` variant, which should be handled

warning: unused `Result` that must be used
   --> src/main.rs:202:5
    |
202 |     main.invoke_export("_call", &[RuntimeValue::I32(1)], &mut NopExternals);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: this `Result` may be an `Err` variant, which should be handled

error: could not compile `RSTrace`

Caused by:
  process didn't exit successfully: `rustc --crate-name RSTrace --edition=2018 src\main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=6f336c8d04ae004b --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern kernel_alloc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_alloc-a8e329f31ad78fcc.rlib --extern kernel_print=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_print-e268efe24f0105ac.rlib --extern libc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\liblibc-b99fd5bfef188159.rlib --extern wasmi=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libwasmi-0d527adc8b1e3172.rlib -C panic=abort -C linker=lld-link.exe -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry -L "native=C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\km\x64"` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
warning: build failed, waiting for other jobs to finish...
error: build failed
```

## link.exe access violation:
```
PS C:\Users\steve\source\repos\RSTrace> cargo build --release --verbose
warning: file found to be present in multiple build targets: C:\Users\steve\source\repos\RSTrace\src\main.rs
warning: output filename collision.
The bin target `RSTrace` in package `RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)` has the same output filename as the lib target `RSTrace` in package `RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)`.
Colliding filename is: C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\RSTrace.pdb
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
warning: output filename collision.
The bin target `RSTrace` in package `RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)` has the same output filename as the lib target `RSTrace` in package `RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)`.
Colliding filename is: C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\RSTrace.pdb
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
       Fresh autocfg v1.0.1
       Fresh unicode-xid v0.2.2
       Fresh cc v1.0.67
       Fresh gimli v0.24.0
       Fresh adler v1.0.2
       Fresh object v0.24.0
       Fresh cfg-if v1.0.0
       Fresh rustc-demangle v0.1.19
   Compiling parity-wasm v0.41.0
   Compiling memory_units v0.3.0
   Compiling downcast-rs v1.2.0
   Compiling kernel-alloc v0.1.0
     Running `rustc --crate-name parity_wasm --edition=2018 C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\parity-wasm-0.41.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=185850c22d453825 -C extra-filename=-185850c22d453825 --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry`
     Running `rustc --crate-name memory_units C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\memory_units-0.3.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=5c93a281eb3244ad -C extra-filename=-5c93a281eb3244ad --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry`
     Running `rustc --crate-name downcast_rs C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\downcast-rs-1.2.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=fb95bd579d80d4f7 -C extra-filename=-fb95bd579d80d4f7 --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry`
     Running `rustc --crate-name kernel_alloc --edition=2018 C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\kernel-alloc-0.1.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=a8e329f31ad78fcc -C extra-filename=-a8e329f31ad78fcc --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry`
       Fresh addr2line v0.15.1
       Fresh proc-macro2 v1.0.26
       Fresh quote v1.0.9
   Compiling winapi v0.3.9
   Compiling libc v0.2.94
       Fresh syn v1.0.72
       Fresh miniz_oxide v0.4.4
   Compiling num-traits v0.2.14
   Compiling libm v0.2.1
     Running `rustc --crate-name winapi C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\winapi-0.3.9\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no --cfg "feature=\"cfg\"" --cfg "feature=\"evntrace\"" --cfg "feature=\"handleapi\"" --cfg "feature=\"impl-debug\"" --cfg "feature=\"impl-default\"" --cfg "feature=\"in6addr\"" --cfg "feature=\"inaddr\"" --cfg "feature=\"minwinbase\"" --cfg "feature=\"minwindef\"" --cfg "feature=\"ntsecapi\"" --cfg "feature=\"timezoneapi\"" --cfg "feature=\"windef\"" --cfg "feature=\"winerror\"" --cfg "feature=\"winioctl\"" --cfg "feature=\"winnt\"" --cfg "feature=\"winreg\"" -C metadata=83ab0813619c2c4f -C extra-filename=-83ab0813619c2c4f --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry --cfg "feature=\"guiddef\"" --cfg "feature=\"sspi\"" --cfg "feature=\"evntprov\"" --cfg "feature=\"devpropdef\"" --cfg "feature=\"excpt\"" --cfg "feature=\"vadefs\"" --cfg "feature=\"ktmtypes\"" --cfg "feature=\"wmistr\"" --cfg "feature=\"basetsd\"" --cfg "feature=\"ntdef\"" --cfg "feature=\"wincred\"" --cfg "feature=\"vcruntime\"" --cfg "feature=\"subauth\"" --cfg "feature=\"rpcndr\"" --cfg "feature=\"lsalookup\"" --cfg "feature=\"wtypesbase\"" --cfg "feature=\"reason\"" --cfg "feature=\"ntstatus\"" --cfg "feature=\"evntcons\"" -l dylib=advapi32 -l dylib=credui -l dylib=kernel32 -l dylib=secur32`
     Running `rustc --crate-name libc C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.94\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=b99fd5bfef188159 -C extra-filename=-b99fd5bfef188159 --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry --cfg freebsd11 --cfg libc_priv_mod_use --cfg libc_union --cfg libc_const_size_of --cfg libc_align --cfg libc_core_cvoid --cfg libc_packedN --cfg libc_cfg_target_vendor`
     Running `rustc --crate-name num_traits C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\num-traits-0.2.14\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=5937657666fd327a -C extra-filename=-5937657666fd327a --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry --cfg has_i128 --cfg has_to_int_unchecked`
       Fresh synstructure v0.12.4
       Fresh backtrace v0.3.59
       Fresh winreg v0.7.0
     Running `rustc --crate-name libm --edition=2018 C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\libm-0.2.1\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no --cfg "feature=\"default\"" -C metadata=3316d021adcfc88e -C extra-filename=-3316d021adcfc88e --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry --cfg assert_no_panic`
       Fresh failure_derive v0.1.8
       Fresh failure v0.1.8
   Compiling num-integer v0.1.44
     Running `rustc --crate-name num_integer C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\num-integer-0.1.44\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=431d22748a795510 -C extra-filename=-431d22748a795510 --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern num_traits=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libnum_traits-5937657666fd327a.rmeta --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry --cfg has_i128`
   Compiling num-rational v0.2.4
     Running `rustc --crate-name num_rational C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\num-rational-0.2.4\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=b796115b65aaa4da -C extra-filename=-b796115b65aaa4da --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern num_integer=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libnum_integer-431d22748a795510.rmeta --extern num_traits=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libnum_traits-5937657666fd327a.rmeta --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry --cfg has_i128 --cfg has_const_fn`
   Compiling wasmi-validation v0.3.0
     Running `rustc --crate-name wasmi_validation --edition=2018 C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmi-validation-0.3.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no --cfg "feature=\"core\"" -C metadata=ff78113de8242483 -C extra-filename=-ff78113de8242483 --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern parity_wasm=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libparity_wasm-185850c22d453825.rmeta --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry`
   Compiling wasmi v0.8.0
     Running `rustc --crate-name wasmi --edition=2018 C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmi-0.8.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no --cfg "feature=\"core\"" --cfg "feature=\"libm\"" --cfg "feature=\"vec_memory\"" -C metadata=0d527adc8b1e3172 -C extra-filename=-0d527adc8b1e3172 --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern downcast_rs=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libdowncast_rs-fb95bd579d80d4f7.rmeta --extern libm=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\liblibm-3316d021adcfc88e.rmeta --extern memory_units=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libmemory_units-5c93a281eb3244ad.rmeta --extern num_rational=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libnum_rational-b796115b65aaa4da.rmeta --extern num_traits=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libnum_traits-5937657666fd327a.rmeta --extern parity_wasm=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libparity_wasm-185850c22d453825.rmeta --extern validation=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libwasmi_validation-ff78113de8242483.rmeta --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry`
   Compiling ntapi v0.3.6
     Running `rustc --crate-name ntapi --edition=2018 C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\ntapi-0.3.6\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no --cfg "feature=\"kernel\"" -C metadata=93ed4177ebaf5458 -C extra-filename=-93ed4177ebaf5458 --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern winapi=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libwinapi-83ab0813619c2c4f.rmeta --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry`
   Compiling kernel-print v0.1.0
     Running `rustc --crate-name kernel_print --edition=2018 C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\kernel-print-0.1.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C embed-bitcode=no --cfg "feature=\"default\"" --cfg "feature=\"format\"" -C metadata=e268efe24f0105ac -C extra-filename=-e268efe24f0105ac --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern ntapi=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libntapi-93ed4177ebaf5458.rmeta --cap-lints allow -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry`
   Compiling RSTrace v0.1.0 (C:\Users\steve\source\repos\RSTrace)
     Running `rustc --crate-name RSTrace --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=23744fd5c77e06ca --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern kernel_alloc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_alloc-a8e329f31ad78fcc.rlib --extern kernel_print=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_print-e268efe24f0105ac.rlib --extern libc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\liblibc-b99fd5bfef188159.rlib --extern wasmi=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libwasmi-0d527adc8b1e3172.rlib -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry -L "native=C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\km\x64"`
     Running `rustc --crate-name RSTrace --edition=2018 src\main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=6f336c8d04ae004b --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern kernel_alloc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_alloc-a8e329f31ad78fcc.rlib --extern kernel_print=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_print-e268efe24f0105ac.rlib --extern libc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\liblibc-b99fd5bfef188159.rlib --extern wasmi=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libwasmi-0d527adc8b1e3172.rlib -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry -L "native=C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\km\x64"`
warning: unused import: `Module`
   --> src\main.rs:190:29
    |
190 | use wasmi::{ImportsBuilder, Module, ModuleInstance, NopExternals, RuntimeValue};
    |                             ^^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default

warning: unused import: `Module`
   --> src/main.rs:190:29
    |
190 | use wasmi::{ImportsBuilder, Module, ModuleInstance, NopExternals, RuntimeValue};
    |                             ^^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default

warning: crate `RSTrace` should have a snake case name
  |
  = note: `#[warn(non_snake_case)]` on by default
  = help: convert the identifier to snake case: `rstrace`

warning: unused attribute
 --> src/main.rs:2:1
  |
2 | #![no_main]
  | ^^^^^^^^^^^
  |
  = note: `#[warn(unused_attributes)]` on by default

warning: crate-level attribute should be in the root module
 --> src/main.rs:2:1
  |
2 | #![no_main]
  | ^^^^^^^^^^^

warning: crate `RSTrace` should have a snake case name
  |
  = note: `#[warn(non_snake_case)]` on by default
  = help: convert the identifier to snake case: `rstrace`

warning: unused `Result` that must be used
   --> src\main.rs:202:5
    |
202 |     main.invoke_export("_call", &[RuntimeValue::I32(1)], &mut NopExternals);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: this `Result` may be an `Err` variant, which should be handled

warning: unused `Result` that must be used
   --> src/main.rs:202:5
    |
202 |     main.invoke_export("_call", &[RuntimeValue::I32(1)], &mut NopExternals);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: this `Result` may be an `Err` variant, which should be handled

error: could not compile `RSTrace`

Caused by:
  process didn't exit successfully: `rustc --crate-name RSTrace --edition=2018 src\main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C embed-bitcode=no -C metadata=6f336c8d04ae004b --out-dir C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps -L dependency=C:\Users\steve\source\repos\RSTrace\target\release\deps --extern kernel_alloc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_alloc-a8e329f31ad78fcc.rlib --extern kernel_print=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libkernel_print-e268efe24f0105ac.rlib --extern libc=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\liblibc-b99fd5bfef188159.rlib --extern wasmi=C:\Users\steve\source\repos\RSTrace\target\x86_64-pc-windows-msvc\release\deps\libwasmi-0d527adc8b1e3172.rlib -C panic=abort -Z pre-link-arg=/NOLOGO -Z pre-link-arg=/NXCOMPAT -Z pre-link-arg=/NODEFAULTLIB -Z pre-link-arg=/SUBSYSTEM:NATIVE -Z pre-link-arg=/DRIVER -Z pre-link-arg=/DYNAMICBASE -C link-arg=/ENTRY:driver_entry -L "native=C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\km\x64"` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
warning: build failed, waiting for other jobs to finish...
error: build failed
```