Fix a regression in Windows dtors.

This commit is contained in:
Vytautas Astrauskas 2020-04-29 15:20:26 -07:00
parent 0e052ab897
commit 603ec0b3d8

View File

@ -342,7 +342,7 @@ fn schedule_next_tls_dtor_for_active_thread(&mut self) -> InterpResult<'tcx> {
let this = self.eval_context_mut();
let active_thread = this.get_active_thread()?;
if this.machine.tls.set_dtors_running_for_thread(active_thread) {
if !this.machine.tls.set_dtors_running_for_thread(active_thread) {
// This is the first time we got asked to schedule a destructor. The
// Windows schedule destructor function must be called exactly once,
// this is why it is in this block.