|
From: Paul M. <pau...@ce...> - 2004-08-19 15:48:38
|
(vg 2.1.2 on redhat 9) code does =20 int state; rc =3D pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &state); assert(rc =3D=3D 0); if (state =3D=3D PTHREAD-CANCEL_ENABLE) .... =20 valgrind says the the if state =3D=3D line depends on an unitialized = memory location. If I attach gdb at that point then yes state contains junk. setcancelstate has not set it When I try to isolate this into a small piece of code it works fine - so I cannot send a simple repro case If I set state =3D 0 before the call to cancel state it also stop vg complaining but the value is still not being set bt the call. The code is inlined in a cpp header file - i dont know if thats a useful clue or not. |