Closed Bug 1424256 Opened 2 years ago Closed 2 years ago

bindgen_test_layout test fail with rust 1.23.0-beta.2

Categories

(Core :: JavaScript Engine: JIT, defect, P2)

defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox59 --- affected

People

(Reporter: rillian, Assigned: fitzgen)

References

Details

spidermonkey-sm-rust-bindings-linux64/debug fails with the current rust beta release. E.g.

> test jsapi::root::bindgen_test_layout_JSJitInfo ... FAILED
> test jsapi::root::bindgen_test_layout_JSJitInfo__bindgen_ty_2 ... FAILED
> test jsapi::root::bindgen_test_layout_JSTypedMethodJitInfo ... FAILED
> 
> failures:
> 
> ---- jsapi::root::bindgen_test_layout_JSJitInfo stdout ----
> 	thread 'jsapi::root::bindgen_test_layout_JSJitInfo' panicked at 'assertion failed: `(left == right)`
>   left: `0`,
>  right: `16`: Size of: JSJitInfo', /builds/worker/workspace/build/src/js/rust/target/debug/build/js-70dc196085be1e90/out/jsapi_debug.rs:2316:4087
> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
> stack backtrace:
>    0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
>              at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
>    1: std::sys_common::backtrace::_print
>              at /checkout/src/libstd/sys_common/backtrace.rs:68
>    2: std::panicking::default_hook::{{closure}}
>              at /checkout/src/libstd/sys_common/backtrace.rs:57
>              at /checkout/src/libstd/panicking.rs:381
>    3: std::panicking::default_hook
>              at /checkout/src/libstd/panicking.rs:391
Nick, any chance you can look into it?
Flags: needinfo?(nfitzgerald)
Assignee: nobody → nfitzgerald
Flags: needinfo?(nfitzgerald)
I'm pretty sure the issue is that bindgen isn't adding `#[repr(C)]` to its enums, just `#[repr(i32)]` and what have you. This just *happened* to work before, but I'm pretty sure it stopped working after eddyb's big layout optimizations PR.
Hm. No that didn't fix the issue.
But if I switch from rustified_enum to constified_enum_module then it *does* work...
Priority: -- → P2
This seems to have fixed itself.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.