Closed
Description
Input C/C++ Header
Sorry, I know you asked for no #include
s, but I'm at a loss as to what the predicate script should do when I'm just importing types from the C library -- If you can't reproduce from the info below, then could you help me with the predicate script plz? :)
#define _GNU_SOURCE
#include <link.h>
Bindgen Invocation
let bindings = bindgen::Builder::default()
.header(WRAPPER_HEADER)
.generate()
.expect("bindgen failed");
Actual Results
When included, like this:
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(dead_code)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
$ RUST_BACKTRACE=1 cargo test bindgen_test_layout_La_x86_64_retval
---- bindgen_test_layout_La_x86_64_retval stdout ----
thread 'bindgen_test_layout_La_x86_64_retval' panicked at 'assertion failed: `(left == right)`
left: `224`,
right: `240`: Size of: La_x86_64_retval', /home/vext01/research/bg/target/debug/build/bg-29903e2596eaef66/out/bindings.rs:3:221231
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::print
at libstd/sys_common/backtrace.rs:71
at libstd/sys_common/backtrace.rs:59
2: std::panicking::default_hook::{{closure}}
at libstd/panicking.rs:211
3: std::panicking::default_hook
at libstd/panicking.rs:221
4: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:475
5: std::panicking::continue_panic_fmt
at libstd/panicking.rs:390
6: std::panicking::begin_panic_fmt
at libstd/panicking.rs:345
7: bg::bindgen_test_layout_La_x86_64_retval
at ./target/debug/build/bg-29903e2596eaef66/out/bindings.rs:3
8: bg::__test::TESTS::{{closure}}
at ./target/debug/build/bg-29903e2596eaef66/out/bindings.rs:3
9: core::ops::function::FnOnce::call_once
at /checkout/src/libcore/ops/function.rs:223
10: <F as alloc::boxed::FnBox<A>>::call_box
at libtest/lib.rs:1459
at /checkout/src/libcore/ops/function.rs:223
at /checkout/src/liballoc/boxed.rs:642
11: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
This is the only failing test.
Expected Results
Test passes.
This is on Debian 9 x86_64, using today's Rust nightly.
FWIW, OpenBSD's <link.h>
does work on an OpenBSD system.
Any ideas?
Metadata
Metadata
Assignees
Labels
No labels