From: Steve G <lin...@ya...> - 2003-06-12 22:00:47
|
Hello, I ran across a problem auditing a daemon. Appearantly, it calls pthread_once() more than once and valgrind terminates the run. In coregrind/vg_libpthread.c around line 1500 is this code: res = __pthread_mutex_lock(&once_masterlock); if (res != 0) { barf("pthread_once: Looks like your program's " "init routine calls back to pthread_once() ?!"); } The man page for pthread_once says: Subsequent calls to pthread_once with the same once_control argument do nothing. So, I changed "barf()" to "return 0" and everything works OK now. It seems that valgrind ought to store the init_routine's address away and just return if they've already been called/stored. FWIW, the daemon I'm testing is /usr/sbin/named. Best Regards, Steve Grubb __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com |