From 0637fe27bc9f07208a1703349a304b27fc08a535 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 25 Oct 2011 22:53:40 -0600 Subject: fix for SH-2624: crash at LLPrivateMemoryPoolManager::freeMem: ASSERT (!addr) --- indra/llcommon/llmemory.cpp | 22 ++++++++++++++-------- indra/llcommon/llmemory.h | 8 ++++---- 2 files changed, 18 insertions(+), 12 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 7d340483b7..7167d705af 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -1773,6 +1773,7 @@ void LLPrivateMemoryPool::LLChunkHashElement::remove(LLPrivateMemoryPool::LLMemo //class LLPrivateMemoryPoolManager //-------------------------------------------------------------------- LLPrivateMemoryPoolManager* LLPrivateMemoryPoolManager::sInstance = NULL ; +BOOL LLPrivateMemoryPoolManager::sPrivatePoolEnabled = FALSE ; std::vector LLPrivateMemoryPoolManager::sDanglingPoolList ; LLPrivateMemoryPoolManager::LLPrivateMemoryPoolManager(BOOL enabled) @@ -1784,7 +1785,7 @@ LLPrivateMemoryPoolManager::LLPrivateMemoryPoolManager(BOOL enabled) mPoolList[i] = NULL ; } - mPrivatePoolEnabled = enabled ; + sPrivatePoolEnabled = enabled ; } LLPrivateMemoryPoolManager::~LLPrivateMemoryPoolManager() @@ -1866,7 +1867,7 @@ void LLPrivateMemoryPoolManager::destroyClass() LLPrivateMemoryPool* LLPrivateMemoryPoolManager::newPool(S32 type) { - if(!mPrivatePoolEnabled) + if(!sPrivatePoolEnabled) { return NULL ; } @@ -1964,7 +1965,11 @@ void LLPrivateMemoryPoolManager::freeMem(LLPrivateMemoryPool* poolp, void* addr } else { - if(!sInstance) //the private memory manager is destroyed, try the dangling list + if(!sPrivatePoolEnabled) + { + free(addr) ; //private pool is disabled. + } + else if(!sInstance) //the private memory manager is destroyed, try the dangling list { for(S32 i = 0 ; i < sDanglingPoolList.size(); i++) { @@ -1985,12 +1990,13 @@ void LLPrivateMemoryPoolManager::freeMem(LLPrivateMemoryPool* poolp, void* addr addr = NULL ; break ; } - } + } + llassert_always(!addr) ; //addr should be release before hitting here! + } + else + { + llerrs << "private pool is used before initialized.!" << llendl ; } - - llassert_always(!addr) ; //addr should be release before hitting here! - - free(addr) ; } } diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 25e6c68e88..7646bcfc25 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -394,11 +394,11 @@ public: LLPrivateMemoryPool* newPool(S32 type) ; void deletePool(LLPrivateMemoryPool* pool) ; -private: - static LLPrivateMemoryPoolManager* sInstance ; - std::vector mPoolList ; - BOOL mPrivatePoolEnabled; +private: + std::vector mPoolList ; + static LLPrivateMemoryPoolManager* sInstance ; + static BOOL sPrivatePoolEnabled; static std::vector sDanglingPoolList ; public: //debug and statistics info. -- cgit v1.2.3 From 5fa125ea0b733b3729208d90777d260db5e331e8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 8 Nov 2011 18:02:08 -0500 Subject: increment viewer version to 3.2.3 --- indra/llcommon/llversionviewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index fc1c1449da..b31fd1f8ae 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -29,7 +29,7 @@ const S32 LL_VERSION_MAJOR = 3; const S32 LL_VERSION_MINOR = 2; -const S32 LL_VERSION_PATCH = 2; +const S32 LL_VERSION_PATCH = 3; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; -- cgit v1.2.3 From 7766ccb7731a596d6716e9d0def90b3d7da5fcf3 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 14 Nov 2011 11:23:12 -0500 Subject: increment viewer version to 3.2.4 --- indra/llcommon/llversionviewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index b31fd1f8ae..b50405421d 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -29,7 +29,7 @@ const S32 LL_VERSION_MAJOR = 3; const S32 LL_VERSION_MINOR = 2; -const S32 LL_VERSION_PATCH = 3; +const S32 LL_VERSION_PATCH = 4; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; -- cgit v1.2.3