You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[test()]
fn create_delete_test() {
unsafe {
let mut a = test::B::new();
test::B_B_destructor(&mut a as *mut _);
}
}
Its the test because for some reason the error appears only from tests.
cargo test --verbose ouput:
running 3 tests
~B
~A
test create_delete_test ... ok
test test::bindgen_test_layout_A ... ok
error: process didn't exit successfully: `/home/fl3/fun/test-sys/target/debug/deps/test_sys-b31f0fc43306b593` (signal: 11, SIGSEGV: invalid memory reference)
And it works pretty fine with ZN1BD1Ev instead of ZN1BD0Ev.
Expected Results
I think, that in that case bindgen should links with ZN1BD1Ev for destructor. ZN1BD0Ev is virtual deleting destructor, and trys to delete rust-allocated memory.
The text was updated successfully, but these errors were encountered:
Input C/C++ Header
Here is origianl source file and entire project, just in case: https://github.com/not-fl3/test-sys/blob/destructor/test.hpp
Bindgen Invocation
$ bindgen test.hpp --generate-inline-functions
Actual Results
Bindgen's generated code:
And here is rust test case:
Its the test because for some reason the error appears only from tests.
cargo test --verbose ouput:
And it works pretty fine with
ZN1BD1Ev
instead ofZN1BD0Ev
.Expected Results
I think, that in that case bindgen should links with
ZN1BD1Ev
for destructor. ZN1BD0Ev is virtual deleting destructor, and trys to delete rust-allocated memory.The text was updated successfully, but these errors were encountered: