I have a bit of code with a race condition in it... I know that it is a race condition because it does not happen consistently, and it seems to happen more often on dual core machines.
It never happens when I'm tracing. Although, there is a possibility that it could be a deadlock as well. By analyzing stages of completion of logs where this does and does not occur, I've been able to pinpoint this bug to a single function. However, I do not know where in the scope of the function this is happening. It's not at the top level.
Adding log statements or breakpoints is going to change the timing if it is a race condition, and prevent this from happening.
Is there any technique that I can use aside from getting a race condition analyzer that will allow me to pinpoint where this is happening?
This is in visual studio 9, with C++ (of the nonmanaged variety).
Thanks, Rokujolady