Speykious / cve-rs

Blazingly 🔥 fast 🚀 memory vulnerabilities, written in 100% safe Rust. 🦀
Other
3.72k stars 94 forks source link

segfault fails to segfault on windows toolchain #10

Closed Morilli closed 4 months ago

Morilli commented 4 months ago
> cargo run segfault
    Finished dev [unoptimized] target(s) in 0.04s
     Running `target\debug\cve-rs.exe segfault`
112
thread 'main' panicked at src\segfault.rs:27:5:
internal error: entered unreachable code: Sorry, your platform is too strong.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\cve-rs.exe segfault` (exit code: 101)

Apparently this function fails to segfault on both stable-x86_64-pc-windows-msvc and stable-x86_64-pc-windows-gnu toolchains on windows, which is going to be a major issue when trying to use this library in a cross-platform environment. It works correctly on linux with the stable-x86_64-unknown-linux-gnu toolchain.

Any ideas?

Creative0708 commented 4 months ago

Thanks for reporting! I've pushed a fix in c78b2b4a5c68402df2cde74f8672d3ec648b152e; see if that works. I'll keep the issue open for now in case more things go wrong.

Creative0708 commented 4 months ago

Closing due to no comments having issues with the implementation so far.