|
From: Dennis L. <pla...@in...> - 2005-03-11 09:07:24
|
Hi, I have a question to how valgrind behaves when running a multithreaded program on a smp machine. I recently discovered a subtle error in our program that only showed up once in a while but very often on smp machines. The reason was that on the smp machines two threads were really run parallel and non-thread-safe parts of the program could interfere directly, while when run on a uniprocessor threads were run one after each other, reducing the possibility of the bug appearing. Now the question, how does valgrind do the scheduling here ? Where can context switches happen, only at the boundaries of basic blocks ? Or anywhere ? greets Dennis Carpe quod tibi datum est |