Open
Description
I'm running cargo test
on this example: https://docs.near.org/build/smart-contracts/quickstart and getting panics on the set_then_get_greeting()
test:
thread 'tests::set_then_get_greeting' panicked at core/src/panicking.rs:221:5:
unsafe precondition(s) violated: ptr::replace requires that the pointer argument is aligned and non-null
Commenting out the log!()
line resolves the issue.
I'm running:
rustc 1.82.0 (f6e511eec 2024-10-15)
cargo-near-near 0.11.0
near-cli-rs 0.15.1
Reverting back to rustc 1.79-aarch64-apple-darwin
fixes the issues, seems like a similar issue to this:
https://stackoverflow.com/questions/78952340/unsafe-preconditions-violated-ptrreplace-requires-that-the-pointer-argument
Rust versions after v1.79 panic:
stable: 1.80, 1.81, 1.82 panics
beta 1.83 panics
nightly 1.84 panics
Metadata
Metadata
Assignees
Type
Projects
Status
NEW❗