darfink / region-rs

A cross-platform virtual memory API written in Rust
https://darfink.github.io/region-rs/
MIT License
119 stars 23 forks source link

protect::protect fails on non-x86 architectures #6

Closed ignatenkobrain closed 5 years ago

ignatenkobrain commented 5 years ago

I'm seeing this failure on armv7hl, aarch64, ppc64le and s390x.

failures:
---- src/protect.rs - protect::protect (line 18) stdout ----
thread 'src/protect.rs - protect::protect (line 18)' panicked at 'test executable failed:
', src/librustdoc/test.rs:332:17
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
failures:
    src/protect.rs - protect::protect (line 18)
test result: FAILED. 6 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
darfink commented 5 years ago

Thanks for reporting.

This wasn't caught in the CI due to https://github.com/rust-embedded/cross/issues/225 which I hadn't noticed. The test is specific for the x86 instruction set, therefore it fails. I'll add a `cfg´ to resolve it (the library itself is not affected, merely the test).

darfink commented 5 years ago

Should be fixed by https://github.com/darfink/region-rs/commit/e4093517ec9a489faa4a6cf69a15e9eeb0ab0693

ignatenkobrain commented 5 years ago

Now I get different error on those arches:

failures:
---- src/protect.rs - protect::protect (line 18) stdout ----
error[E0601]: `main` function not found in crate `rust_out`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0601`.
thread 'src/protect.rs - protect::protect (line 18)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:310:13
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
failures:
    src/protect.rs - protect::protect (line 18)
test result: FAILED. 6 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
ignatenkobrain commented 5 years ago

@darfink https://github.com/darfink/region-rs/pull/7