On Thu, Dec 10, 2009 at 1:08 AM, Aleksander <valgrind-us...@aleksander.es> wrote: > Can someone explain the error shown below? > > It's in a glib-based application, and it seems that DRD doesn't like the > call to send() in libpthread while creating a new thread at the same time... > Why is this wrong? > > [ ... ] > > ==19314== Conflicting load by thread 6 at 0x39ba019310 size 4 > ==19314== at 0x39B9E0D192: send (in /lib64/libpthread-2.5.so) > ==19314== by 0x4C342D0: __jardin_connection_module_send_impl > (jardin_connection_module.c:863) > [ ... ] ==19314== Allocation context: BSS section of /lib64/libpthread-2.5.so > [ ... ]
DRD uses the Valgrind core to print a call stack when a conflicting memory access has been detected. I'm not sure the library information in the above call stack is correct: as far as I know send() is a function that has been implemented in libc and not in libpthread. If it's not clear why DRD reports a conflicting memory access, the following will help: - Start from the address on which a conflicting memory access has been reported, and find out with which data structure in the source code program this address corresponds. If you don't have a clue, inspect your program at the time the conflicting memory access was reported with --db-attach=yes. - Find out where the data structure has been allocated. If the memory has been allocated dynamically, insert a DRD_TRACE_VAR(...) statement just after the allocation. If it's a global or static variable, insert the DRD_TRACE_VAR(...) macro in a function that is called before the data structure is used. See also the Valgrind manual for more information about the DRD_TRACE_VAR() macro. Bart. ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users