- Made VMFrameStack GlobalVMStack a non thread_local variable for MinGW since that helps to prevent crashes on exit.

This commit is contained in:
drfrag666 2018-05-14 12:53:57 +02:00
parent c06501d7ca
commit 429bd5d843
2 changed files with 8 additions and 0 deletions

View file

@ -149,7 +149,11 @@ VMExec_Checked::Exec
// Note: If the VM is being used in multiple threads, this should be declared as thread_local.
// ZDoom doesn't need this at the moment so this is disabled.
#ifndef __MINGW32__
thread_local VMFrameStack GlobalVMStack;
#else
VMFrameStack GlobalVMStack;
#endif
//===========================================================================

View file

@ -433,7 +433,11 @@ void VMFillParams(VMValue *params, VMFrame *callee, int numparam);
void VMDumpConstants(FILE *out, const VMScriptFunction *func);
void VMDisasm(FILE *out, const VMOP *code, int codesize, const VMScriptFunction *func);
#ifndef __MINGW32__
extern thread_local VMFrameStack GlobalVMStack;
#else
extern VMFrameStack GlobalVMStack;
#endif
typedef std::pair<const class PType *, unsigned> FTypeAndOffset;