Stream: git-wasmtime

Topic: wasmtime / issue #4210 Cranelift: cranelift-object symbol...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:38):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:38):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:38):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:42):

abrown commented on issue #4210:

cc: @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:46):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:57):

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 the tests/ directory in the crate aren't being run; we just get

     Running unittests src/lib.rs (target/debug/deps/cranelift_object-398aa25782466210)

running 0 tests

I suspect because we don't have --tests in our cargo test --workspace invocation in ci/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!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 20:34):

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: Oct 23 2024 at 20:03 UTC