-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.E-needs-investigationCall for partcipation: This issues needs some investigation to determine current statusCall for partcipation: This issues needs some investigation to determine current statusO-AArch64Armv8-A or later processors in AArch64 modeArmv8-A or later processors in AArch64 modeO-macosOperating system: macOSOperating system: macOST-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
I tried this code:
https://github.com/near/near-sdk-rs/blob/master/near-sdk/src/environment/mock/mod.rs#L11-L16
thread_local! {
static BLOCKCHAIN_INTERFACE: RefCell<MockedBlockchain>
= RefCell::new(MockedBlockchain::default());
}
I expected to see this happen:
thread_local!
initialization code for RefCell::new(MockedBlockchain::new)
works
Instead, this happened:
on unclarified aarch64-apple-darwin
environment(s) thread_local!
panics on https://doc.rust-lang.org/src/core/ptr/mod.rs.html#1277 .
The issue doesn't reproduce on other aarch64-apple-darwin
real macs,
and on macos-14-arm64
github actions vm.
Original issue: near/near-sdk-rs#1252
Meta
rustc --version --verbose
:
stable: 1.80, 1.81, 1.82 panics
beta 1.83 panics
nightly 1.84 panics
backtrace from original issue:
near/near-sdk-rs#1252 (comment)
Metadata
Metadata
Assignees
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.E-needs-investigationCall for partcipation: This issues needs some investigation to determine current statusCall for partcipation: This issues needs some investigation to determine current statusO-AArch64Armv8-A or later processors in AArch64 modeArmv8-A or later processors in AArch64 modeO-macosOperating system: macOSOperating system: macOST-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.