Skip to content

Commit

Permalink
fix writing to read-only raw pointer in thread-local test
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Oct 31, 2020
1 parent 4cdb54a commit d1c9a6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/run-pass/thread-local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d1c9a6e

Please sign in to comment.