diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-18 12:19:33 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-18 12:19:33 +0200 |
commit | 4c96ebdcfe075e80810b01257cf21ea1c9b3ec0e (patch) | |
tree | b6768398d8d55c04e045b5213e11b952484025e8 /runtime/debug.h | |
parent | 988989e49ef8639123c83383ba256c4e67679c8d (diff) | |
download | rsyslog-4c96ebdcfe075e80810b01257cf21ea1c9b3ec0e.tar.gz rsyslog-4c96ebdcfe075e80810b01257cf21ea1c9b3ec0e.tar.xz rsyslog-4c96ebdcfe075e80810b01257cf21ea1c9b3ec0e.zip |
bugfix: potential race condition when adding messages to queue
There was a wrong order of mutex lock operations. It is hard to
believe that really caused problems, but in theory it could and with
threading we often see that theory becomes practice if something is only
used long enough on a fast enough machine with enough CPUs ;)
Diffstat (limited to 'runtime/debug.h')
-rw-r--r-- | runtime/debug.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/debug.h b/runtime/debug.h index 214b7c05..d9d576b5 100644 --- a/runtime/debug.h +++ b/runtime/debug.h @@ -130,7 +130,8 @@ void dbgPrintAllDebugInfo(void); /* debug aides */ -#ifdef RTINST +//#ifdef RTINST +#if 0 // temporarily removed for helgrind #define d_pthread_mutex_lock(x) dbgMutexLock(x, pdbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) #define d_pthread_mutex_unlock(x) dbgMutexUnlock(x, pdbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) #define d_pthread_cond_wait(cond, mut) dbgCondWait(cond, mut, pdbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) |