Re: Question: bug in user code, valgrind or glibc?

John Reiser <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
> I sent a log of redirect information to both Paul and John since the log was too large was mailing list.
> 
> I wonder what would be the preferred public sharing site for such a purpose these days.

The preferred way is to create a bug report, attach the large file to the bug report,
then post the URL of the bug report in a message to the mailing list.

Begin at  https://valgrind.org/ .  In the left nav, click on "Bug Reports", and follow
the directions on the resulting page.


> 143:39.43 GECKO(115765) ==115769== Invalid read of size 8
> 143:39.64 GECKO(115765) ==115769==    at 0x4021BF4: strncmp (strcmp.S:175)
> 143:39.64 GECKO(115765) ==115769==    by 0x400655D: is_dst (dl-load.c:214) 

This indicates that 'strncmp' should be re-directed from ld-linux-x86-64.so.2:
=====
diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c
index 3b42b3a87..8272a3ae7 100644
--- a/shared/vg_replace_strmem.c
+++ b/shared/vg_replace_strmem.c
@@ -710,6 +710,7 @@ static inline void my_exit ( int x )
   STRNCMP(VG_Z_LIBC_SONAME, __GI_strncmp)
   STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse2)
   STRNCMP(VG_Z_LIBC_SONAME, __strncmp_sse42)
+ STRNCMP("ld-linux*.so*", strncmp)

  #elif defined(VGO_freebsd)
   STRNCMP(VG_Z_LIBC_SONAME, strncmp)
=====
For instance, such a change is relevant to glibc-2.33-21.fc34.x86_64:
$ readelf --all /lib64/ld-linux-x86-64.so.2 | grep strncmp
   1706: 0000000000022d30  6233 FUNC    LOCAL  DEFAULT   13 strncmp
$
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.