From: Rainer G. <rge...@gm...> - 2010-03-17 14:34:42
|
On Wed, Mar 17, 2010 at 11:20 AM, Julian Seward <js...@ac...> wrote: > Hmm, you'll need to create a STRNCMP template in h_intercepts.c do deal > with that. You can just copy the relevant code from mc_replace_strmem.c. > > If you do this and it works, please send the resulting diff. This seems to work :) Before I send the diff, let me ask another set of questions. Maybe some other simple copy (I searched the files in ./memcheck, but did not find any replacements there -- with my very little knowledge on memcheck): =11294== Thread 4: ==11294== Invalid read of size 4 ==11294== at 0x303EE05809: sigcancel_handler (in /lib64/libpthread-2.11.1.so) ==11294== by 0x303EE0F0EF: ??? (in /lib64/libpthread-2.11.1.so) ==11294== by 0x303E2D73E2: ??? (in /lib64/libc-2.11.1.so) ==11294== by 0x8E5137E: Select (nsdsel_ptcp.c:115) ==11294== by 0x5435EA7: Wait (nssel.c:161) ==11294== by 0x563E069: Run (tcpsrv.c:509) ==11294== by 0x52304F2: runInput (imtcp.c:234) ==11294== by 0x44EB5F: thrdStarter (threads.c:139) ==11294== by 0x303EE06A39: start_thread (in /lib64/libpthread-2.11.1.so) ==11294== Address 0x7a29228 is 47836712 bytes after the accessing pointer's ==11294== legitimate range, a block of size 288 alloc'd ==11294== at 0x4A03E96: calloc (vg_replace_malloc.c:467) ==11294== by 0x8E51675: nsdsel_ptcpConstruct (nsdsel_ptcp.c:52) ==11294== by 0x54362FC: ConstructFinalize (nssel.c:126) ==11294== by 0x563DFA2: Run (tcpsrv.c:492) ==11294== by 0x52304F2: runInput (imtcp.c:234) ==11294== by 0x44EB5F: thrdStarter (threads.c:139) ==11294== by 0x303EE06A39: start_thread (in /lib64/libpthread-2.11.1.so) ==11294== AND ==11294== Invalid read of size 4 ==11294== at 0x35FAA111F1: ??? (in /lib64/libgcc_s-4.4.3-20100127.so.1) ==11294== by 0x303E31A8B5: dl_iterate_phdr (in /lib64/libc-2.11.1.so) ==11294== by 0x35FAA11FD6: _Unwind_Find_FDE (in /lib64/libgcc_s-4.4.3-20100127.so.1) ==11294== by 0x35FAA0F3F2: ??? (in /lib64/libgcc_s-4.4.3-20100127.so.1) ==11294== by 0x35FAA0FCF8: ??? (in /lib64/libgcc_s-4.4.3-20100127.so.1) ==11294== by 0x35FAA10035: _Unwind_ForcedUnwind (in /lib64/libgcc_s-4.4.3-20100127.so.1) ==11294== by 0x303EE0D86F: __pthread_unwind (in /lib64/libpthread-2.11.1.so) ==11294== by 0x303EE05869: sigcancel_handler (in /lib64/libpthread-2.11.1.so) ==11294== by 0x303EE0F0EF: ??? (in /lib64/libpthread-2.11.1.so) ==11294== by 0x303E2D73E2: ??? (in /lib64/libc-2.11.1.so) ==11294== by 0x8E5137E: Select (nsdsel_ptcp.c:115) ==11294== by 0x5435EA7: Wait (nssel.c:161) ==11294== Address 0x303ea00040 is not derived from any known block This is from an older version of my code (which I currently need to debug) which uses pthread_cancel as part of the shutdown process (the newer versions don't do, so we do not need to argue whether that is good or not). I guess I can just create suppressions for these, but I thought I ask. Rainer |