From: Nicholas N. <nj...@ca...> - 2003-06-01 13:59:01
|
On Sat, 31 May 2003, Xiaolei Hao wrote: > When I tried the valgrind with my problem, the valgrind always gets crashed > with a "segmentation fault" as soon as I perfomed a particular operation. > However, the program doesn't crash itself if it runs alone. When you run your program under Valgrind, it's behaviour isn't preserved exactly -- things like thread scheduling and memory layouts can be a bit different. Your original program might not crash due to luck. Since the jump to 0x0 occurs from within _pthread_cleanup_pop, it looks like you might have accidentally registered a NULL cleanup handler with pthread_cleanup_push? Could this have happened? (If so, I'm not sure why your program wouldn't crash normally... it might be a bug in Valgrind, but I would try to fix the three errors Valgrind claims to see first. Chances are if you do that it won't crash under Valgrind anymore, and you can be more confident it won't crash randomly when run normally.) N |