-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi, I triggered a panic when calling the safe API pen_ffi::Arc::<T>::new with some types (e.g., i128).
extern crate pen_ffi;
fn main() {
let x: i128 = 1;
let _ = pen_ffi::Arc::<i128>::new(x);
}I'm using pen-ffi = "0.10.23":
[dependencies]
pen-ffi = "0.10.23"
- OS: Linux x86_64 (Ubuntu)
- Rust toolchain:
nightly-2024-12-15
Command:
cargo +nightly-2024-12-15 run -Zbuild-stdIt aborts with:
thread 'main' panicked at .../.rustup/toolchains/nightly-2024-12-15-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:218:5:
unsafe precondition(s) violated: ptr::write requires that the pointer argument is aligned and non-null
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting.
Aborted (core dumped)
Is pen_ffi::Arc<T> intended to support any T (including i128), or are there alignment restrictions on T?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels