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.
This commit is contained in:
jackpoz
2014-03-02 14:06:05 +01:00
parent 3a40d8a887
commit e4ab18a69c

View File

@@ -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