8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 06:43:03 +01:00

Trivial fix for CORE-4500: Firebird crashes after unsuccessful remapping of the lock table's shared memory.

This commit is contained in:
dimitr 2014-07-29 05:35:49 +00:00
parent e2d1b20425
commit 31bdbe0462

View File

@ -1655,6 +1655,8 @@ void LockManager::bug(ISC_STATUS* status_vector, const TEXT* string)
{
m_bugcheck = true;
if (m_header)
{
// The lock table has some problem - copy it for later analysis
TEXT buffer[MAXPATHLEN];
@ -1669,13 +1671,14 @@ void LockManager::bug(ISC_STATUS* status_vector, const TEXT* string)
// If the current mutex acquirer is in the same process, release the mutex
if (m_header && (m_header->lhb_active_owner > 0))
if (m_header->lhb_active_owner > 0)
{
const own* const owner = (own*) SRQ_ABS_PTR(m_header->lhb_active_owner);
const prc* const process = (prc*) SRQ_ABS_PTR(owner->own_process);
if (process->prc_process_id == PID)
release_shmem(m_header->lhb_active_owner);
}
}
if (status_vector)
{