|
From: Owen O'M. <ow...@em...> - 2003-10-15 17:05:13
Attachments:
philosopher.c
|
I tried helgrind on my dining philosopher example program and it
didn't find the bug. After a little investigation I found the
following brain hiccup in helgrind:
*** helgrind/hg_main.c~ Thu Jul 24 14:00:16 2003
--- helgrind/hg_main.c Wed Oct 15 09:51:24 2003
***************
*** 3253,3259 ****
VG_(track_post_thread_create) (& hg_thread_create);
VG_(track_post_thread_join) (& hg_thread_join);
! VG_(track_post_mutex_lock) (& eraser_pre_mutex_lock);
VG_(track_post_mutex_lock) (& eraser_post_mutex_lock);
VG_(track_post_mutex_unlock) (& eraser_post_mutex_unlock);
--- 3253,3259 ----
VG_(track_post_thread_create) (& hg_thread_create);
VG_(track_post_thread_join) (& hg_thread_join);
! VG_(track_pre_mutex_lock) (& eraser_pre_mutex_lock);
VG_(track_post_mutex_lock) (& eraser_post_mutex_lock);
VG_(track_post_mutex_unlock) (& eraser_post_mutex_unlock);
with the fix helgrind does find the locking order problem.
Owen
|
|
From: Nicholas N. <nj...@ca...> - 2003-10-15 17:25:19
|
On Wed, 15 Oct 2003, Owen O'Malley wrote: > After a little investigation I found the following brain hiccup in > helgrind: > > ! VG_(track_post_mutex_lock) (& eraser_pre_mutex_lock); > > ! VG_(track_pre_mutex_lock) (& eraser_pre_mutex_lock); Yikes! Thanks for spotting it, I've committed the change. N |