aboutsummaryrefslogtreecommitdiff
path: root/dep
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-03-02 14:06:05 +0100
committerjackpoz <giacomopoz@gmail.com>2014-03-02 14:06:05 +0100
commite4ab18a69c677183a519393708bc5ce32fb38fcc (patch)
tree3b654d06c9a3372b0b7ba00c2dfd18e47ca077c5 /dep
parent3a40d8a88790209238142c46341b3c76cc1a2454 (diff)
Dep/ACE: Fix assertion triggered on shutdown
Fix assertion triggered on shutdown on Windows platform Debug mode by back-porting fix from ACE revision 96226. Fixes #9770.
Diffstat (limited to 'dep')
-rw-r--r--dep/acelite/ace/OS_NS_Thread.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/dep/acelite/ace/OS_NS_Thread.cpp b/dep/acelite/ace/OS_NS_Thread.cpp
index 8e36eb9e4f7..c450bc81371 100644
--- a/dep/acelite/ace/OS_NS_Thread.cpp
+++ b/dep/acelite/ace/OS_NS_Thread.cpp
@@ -885,8 +885,12 @@ ACE_TSS_Cleanup::thread_detach_key (ACE_thread_key_t key)
ACE_TSS_CLEANUP_GUARD
u_int key_index = key;
- ACE_ASSERT (key_index < sizeof(this->table_)/sizeof(this->table_[0])
- && this->table_[key_index].key_ == key);
+ ACE_ASSERT (key_index < sizeof(this->table_)/sizeof(this->table_[0]));
+ // If this entry was never set, just bug out. If it is set, but is the
+ // wrong key, assert.
+ if (this->table_[key_index].key_ == 0)
+ return 0;
+ ACE_ASSERT(this->table_[key_index].key_ == key);
ACE_TSS_Info &info = this->table_ [key_index];
// sanity check