From 0a956d32f9c8e3802714c4bbbc10fca39c24ef6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Thu, 2 Jan 2014 18:41:15 +0100 Subject: [PATCH] 2014-01-02 18:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/vm/hvm.c * clear STATIC variables before releasing thread specific data. It should resolve potential problems with code using TSD to activate cleanup procedure and later cannot correctly execute pointer item destructors, i.e. OLE subsystem. --- ChangeLog.txt | 7 +++++++ src/vm/hvm.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 16b9afb37f..6d93a912dc 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,13 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2014-01-02 18:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/vm/hvm.c + * clear STATIC variables before releasing thread specific data. + It should resolve potential problems with code using TSD to activate + cleanup procedure and later cannot correctly execute pointer item + destructors, i.e. OLE subsystem. + 2014-01-02 13:11 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/itemseri.c ! fixed casting for C++ builds diff --git a/src/vm/hvm.c b/src/vm/hvm.c index 692157ffbf..84391f9bd1 100644 --- a/src/vm/hvm.c +++ b/src/vm/hvm.c @@ -1158,14 +1158,14 @@ int hb_vmQuit( void ) hb_vmDebuggerExit( HB_TRUE ); #endif - /* release thread specific data */ - hb_stackDestroyTSD(); - /* stop executing PCODE (HVM reenter request) */ s_fHVMActive = HB_FALSE; hb_vmStaticsClear(); + /* release thread specific data */ + hb_stackDestroyTSD(); + hb_errExit(); hb_clsReleaseAll();