|
From: Rob H. <ti...@ge...> - 2005-08-18 22:27:17
|
On Thu, 2005-08-18 at 23:13 +0100, Tom Hughes wrote: > I'd be surprised if that works - that dlopen would normally return a > handle for the existing C library which would meand the symbols have > the same address and would get redirected again. It does work :) tigger@xahn % valgrind --tool=3Dformatcheck /tmp/test =3D=3D24444=3D=3D formatcheck, format string check. =3D=3D24444=3D=3D Copyright (C) 2005, and GNU GPL'd, by Rob Holland. =3D=3D24444=3D=3D Using LibVEX rev 1338, a library for dynamic binary translation. =3D=3D24444=3D=3D Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. =3D=3D24444=3D=3D Using valgrind-3.1.SVN, a dynamic binary instrumentation framework. =3D=3D24444=3D=3D Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward = et al. =3D=3D24444=3D=3D For more details, rerun with: -v =3D=3D24444=3D=3D=20 =3D=3D24444=3D=3D Format string with no specifiers: 'rabbits' =3D=3D24444=3D=3D at 0x2571B94B: sprintf (fc_replace_format_functions.c:= 141) =3D=3D24444=3D=3D by 0x400647: main (test.c:5) =3D=3D24444=3D=3D=20 =3D=3D24444=3D=3D Format string is not a literal (appears to be from heap):= 'foo %s' =3D=3D24444=3D=3D at 0x2571B5FA: printf (fc_replace_format_functions.c:9= 6) =3D=3D24444=3D=3D by 0x400663: main (test.c:6) =3D=3D24444=3D=3D=20 =3D=3D24444=3D=3D Format string is not a literal (appears to be from heap): 'rabbits' =3D=3D24444=3D=3D at 0x2571B5FA: printf (fc_replace_format_functions.c:9= 6) =3D=3D24444=3D=3D by 0x400671: main (test.c:7) =3D=3D24444=3D=3D=20 =3D=3D24444=3D=3D Format string was target of previous s*printf: 'rabbits' =3D=3D24444=3D=3D at 0x2571B5FA: printf (fc_replace_format_functions.c:9= 6) =3D=3D24444=3D=3D by 0x400671: main (test.c:7) =3D=3D24444=3D=3D=20 =3D=3D24444=3D=3D Format string with no specifiers: 'rabbits' =3D=3D24444=3D=3D at 0x2571B648: printf (fc_replace_format_functions.c:1= 00) =3D=3D24444=3D=3D by 0x400671: main (test.c:7) =3D=3D24444=3D=3D=20 =3D=3D24444=3D=3D Format string is not a literal (appears to be from heap): 'eh?' =3D=3D24444=3D=3D at 0x2571B755: fprintf (fc_replace_format_functions.c:= 116) =3D=3D24444=3D=3D by 0x40068F: main (test.c:8) =3D=3D24444=3D=3D=20 =3D=3D24444=3D=3D Format string with no specifiers: 'eh?' =3D=3D24444=3D=3D at 0x2571B7A6: fprintf (fc_replace_format_functions.c:= 120) =3D=3D24444=3D=3D by 0x40068F: main (test.c:8) eh?foo bearrabbits=3D=3D24444=3D=3D=20 =3D=3D24444=3D=3D ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 fr= om 0) --=20 |