abrown opened issue #4210:
Steps to Reproduce
$ cargo test -p cranelift-object
Expected Results
All tests pass
Actual Results
failures: ---- reject_nul_byte_symbol_for_data stdout ---- thread 'reject_nul_byte_symbol_for_data' panicked at 'called `Result::unwrap()` on an `Err` value: Backend(Symbol "data\u{0}with\u{0}nul\u{0}bytes" has a null byte, which is disallowed)', cranelift/object/tests/basic.rs:245:10 note: panic did not contain expected string panic message: `"called `Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed)"`, expected substring: `"Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"` ---- reject_nul_byte_symbol_for_func stdout ---- thread 'reject_nul_byte_symbol_for_func' panicked at 'called `Result::unwrap()` on an `Err` value: Backend(Symbol "function\u{0}with\u{0}nul\u{0}bytes" has a null byte, which is disallowed)', cranelift/object/tests/basic.rs:222:10 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace note: panic did not contain expected string panic message: `"called `Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed)"`, expected substring: `"Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"` failures: reject_nul_byte_symbol_for_data reject_nul_byte_symbol_for_func
Versions and Environment
Cranelift version or commit:
main
Operating system: Fedora 35, v5.17.6-200.fc35.x86_64
Architecture: x86_64
abrown labeled issue #4210:
Steps to Reproduce
$ cargo test -p cranelift-object
Expected Results
All tests pass
Actual Results
failures: ---- reject_nul_byte_symbol_for_data stdout ---- thread 'reject_nul_byte_symbol_for_data' panicked at 'called `Result::unwrap()` on an `Err` value: Backend(Symbol "data\u{0}with\u{0}nul\u{0}bytes" has a null byte, which is disallowed)', cranelift/object/tests/basic.rs:245:10 note: panic did not contain expected string panic message: `"called `Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed)"`, expected substring: `"Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"` ---- reject_nul_byte_symbol_for_func stdout ---- thread 'reject_nul_byte_symbol_for_func' panicked at 'called `Result::unwrap()` on an `Err` value: Backend(Symbol "function\u{0}with\u{0}nul\u{0}bytes" has a null byte, which is disallowed)', cranelift/object/tests/basic.rs:222:10 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace note: panic did not contain expected string panic message: `"called `Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed)"`, expected substring: `"Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"` failures: reject_nul_byte_symbol_for_data reject_nul_byte_symbol_for_func
Versions and Environment
Cranelift version or commit:
main
Operating system: Fedora 35, v5.17.6-200.fc35.x86_64
Architecture: x86_64
abrown labeled issue #4210:
Steps to Reproduce
$ cargo test -p cranelift-object
Expected Results
All tests pass
Actual Results
failures: ---- reject_nul_byte_symbol_for_data stdout ---- thread 'reject_nul_byte_symbol_for_data' panicked at 'called `Result::unwrap()` on an `Err` value: Backend(Symbol "data\u{0}with\u{0}nul\u{0}bytes" has a null byte, which is disallowed)', cranelift/object/tests/basic.rs:245:10 note: panic did not contain expected string panic message: `"called `Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed)"`, expected substring: `"Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"` ---- reject_nul_byte_symbol_for_func stdout ---- thread 'reject_nul_byte_symbol_for_func' panicked at 'called `Result::unwrap()` on an `Err` value: Backend(Symbol "function\u{0}with\u{0}nul\u{0}bytes" has a null byte, which is disallowed)', cranelift/object/tests/basic.rs:222:10 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace note: panic did not contain expected string panic message: `"called `Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed)"`, expected substring: `"Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"` failures: reject_nul_byte_symbol_for_data reject_nul_byte_symbol_for_func
Versions and Environment
Cranelift version or commit:
main
Operating system: Fedora 35, v5.17.6-200.fc35.x86_64
Architecture: x86_64
abrown commented on issue #4210:
cc: @cfallin
bjorn3 commented on issue #4210:
The
Debug
impl for strings changed how it escapes nul bytes between rust 1.60 and 1.61: https://rust.godbolt.org/z/Pa6GW1jfW
cfallin commented on issue #4210:
Hmm, interesting. My top-level question is why CI didn't catch this. At first I suspected that we might not be testing with the latest stable, but indeed we are: this recent run on
main
for example completed with Rust 1.61. But looking at the logs more closely it seems that tests for cranelift-object from thetests/
directory in the crate aren't being run; we just getRunning unittests src/lib.rs (target/debug/deps/cranelift_object-398aa25782466210) running 0 tests
I suspect because we don't have
--tests
in ourcargo test --workspace
invocation inci/run-tests.sh
? (I don't fully understand the implications of different choices here though, maybe @alexcrichton has an opinion on what we should be doing?)In any case, I'll do a quick PR to fix, thanks!
cfallin closed issue #4210:
Steps to Reproduce
$ cargo test -p cranelift-object
Expected Results
All tests pass
Actual Results
failures: ---- reject_nul_byte_symbol_for_data stdout ---- thread 'reject_nul_byte_symbol_for_data' panicked at 'called `Result::unwrap()` on an `Err` value: Backend(Symbol "data\u{0}with\u{0}nul\u{0}bytes" has a null byte, which is disallowed)', cranelift/object/tests/basic.rs:245:10 note: panic did not contain expected string panic message: `"called `Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed)"`, expected substring: `"Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"` ---- reject_nul_byte_symbol_for_func stdout ---- thread 'reject_nul_byte_symbol_for_func' panicked at 'called `Result::unwrap()` on an `Err` value: Backend(Symbol "function\u{0}with\u{0}nul\u{0}bytes" has a null byte, which is disallowed)', cranelift/object/tests/basic.rs:222:10 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace note: panic did not contain expected string panic message: `"called `Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed)"`, expected substring: `"Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"` failures: reject_nul_byte_symbol_for_data reject_nul_byte_symbol_for_func
Versions and Environment
Cranelift version or commit:
main
Operating system: Fedora 35, v5.17.6-200.fc35.x86_64
Architecture: x86_64
Last updated: Dec 23 2024 at 13:07 UTC