fix writing to read-only raw pointer in thread-local test

This commit is contained in:
Ralf Jung 2020-10-31 16:22:16 +01:00
parent 80a0a12b07
commit f936bc6b92

View File

@ -58,7 +58,7 @@ fn main() {
// Initialize the keys we use to check destructor ordering
for (key, global) in KEYS.iter_mut().zip(GLOBALS.iter_mut()) {
*key = create(Some(mem::transmute(dtor as unsafe extern fn(*mut u64))));
set(*key, global as *const _ as *mut _);
set(*key, global as *mut _ as *mut u8);
}
// Initialize cannary