-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quickstart example panics on rust v1.80+ (aarch64-apple-darwin , bug of apple's bag of tools) #1252
Comments
Adding some additional info:
|
FYI, running The near-sdk-rs/near-sdk/src/environment/env.rs Line 886 in eda17d5
If I turn off debug assertions: The
|
@peitalin thank you for the detailed report! @dj8yfo and I looking into it now. I saw something similar before, but didn't have time to troubleshoot it, and it got resolved for me on its own. If you have the capacity to dig into it and find the root cause, I'm happy to allocate $500 USDC bounty reward |
887 is sys::log_utf8 https://docs.rs/crate/near-sdk/5.5.0/source/src/environment/env.rs#887 in published version of code |
Adding Running It seems that the panic occurs when Here it fails some pointer alignment checks in
Somehow adding the extra |
@peitalin i've linked a duplicating issue from rustc. |
The project seems to work with 1.82.0 as well:
Am I missing something? Otherwise, it seems like the issue is OS-dependent. |
is this still open? |
@peitalin can you provide more details about your system into |
@dj8yfo sure, just added a reproduction in the other thread: rust-lang/rust#132704 (comment) |
I'm running
cargo test
on this example: https://docs.near.org/build/smart-contracts/quickstart and getting panics on theset_then_get_greeting()
test:Commenting out the
log!()
line resolves the issue.I'm running:
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:
The text was updated successfully, but these errors were encountered: