STATUS_ACCESS_VIOLATION
in unstable thread_local
feature on windows-gnu
#100917
Open
Description
I tried this code:
#![feature(thread_local)]
use std::cell::RefCell;
use std::mem::MaybeUninit;
#[thread_local]
static PLACE: RefCell<usize> = RefCell::new(0);
fn touch(x: usize) {
*PLACE.borrow_mut() = x;
}
pub fn main() {
touch(12);
}
But it breaks down inside RefCell
:
error: process didn't exit successfully: 'target\debug\sandbox.exe' (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
rustc 1.65.0-nightly (878aef79d 2022-08-20)
binary: rustc
commit-hash: 878aef79dcdf59d19bb8482202dc55e58ceb62ff
commit-date: 2022-08-20
host: x86_64-pc-windows-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0
Activity