Skip to content

Commit 174adad

Browse files
author
Vytautas Astrauskas
committed
Use DLL_THREAD_DETACH when calling windows TLS destructor.
1 parent d9e18ad commit 174adad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/tls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
213213
let thread_callback = this.memory.get_fn(thread_callback.not_undef()?)?.as_instance()?;
214214

215215
// The signature of this function is `unsafe extern "system" fn(h: c::LPVOID, dwReason: c::DWORD, pv: c::LPVOID)`.
216-
let reason = this.eval_path_scalar(&["std", "sys", "windows", "c", "DLL_PROCESS_DETACH"])?;
216+
let reason = this.eval_path_scalar(&["std", "sys", "windows", "c", "DLL_THREAD_DETACH"])?;
217217
let ret_place = MPlaceTy::dangling(this.machine.layouts.unit, this).into();
218218
this.call_function(
219219
thread_callback,

0 commit comments

Comments
 (0)