bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

valgrind errors for texi2any tests ("is_dst")


From: Gavin Smith
Subject: valgrind errors for texi2any tests ("is_dst")
Date: Wed, 23 Oct 2024 20:09:34 +0100

I was running the tests under tp/t under valgrind and it was mostly
fine, apart from an error that came from running

perl -w t/info_tests.t chinese_mixed_with_en_EUC_CN

This logs an error with

==400562== Invalid read of size 8
==400562==    at 0x40286C0: strncmp (strcmp.S:170)
==400562==    by 0x400668D: is_dst (dl-load.c:216)
==400562==    by 0x400810E: _dl_dst_count (dl-load.c:253)
==400562==    by 0x400810E: expand_dynamic_string_token (dl-load.c:395)
==400562==    by 0x40082B7: fillin_rpath.isra.0 (dl-load.c:483)
==400562==    by 0x4008602: decompose_rpath (dl-load.c:654)
==400562==    by 0x400ABF5: cache_rpath (dl-load.c:696)
==400562==    by 0x400ABF5: cache_rpath (dl-load.c:677)
==400562==    by 0x400ABF5: _dl_map_object (dl-load.c:2165)
==400562==    by 0x4003494: openaux (dl-deps.c:64)
==400562==    by 0x4ACCC27: _dl_catch_exception (dl-error-skeleton.c:208)
==400562==    by 0x4003C7B: _dl_map_object_deps (dl-deps.c:248)
==400562==    by 0x400EA0E: dl_open_worker_begin (dl-open.c:592)
==400562==    by 0x4ACCC27: _dl_catch_exception (dl-error-skeleton.c:208)
==400562==    by 0x400DF99: dl_open_worker (dl-open.c:782)
==400562==  Address 0x9307ed1 is 1 bytes inside a block of size 8 alloc'd
==400562==    at 0x4848899: malloc (in 
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==400562==    by 0x40271FF: malloc (rtld-malloc.h:56)
==400562==    by 0x40271FF: strdup (strdup.c:42)
==400562==    by 0x4008594: decompose_rpath (dl-load.c:629)
==400562==    by 0x400ABF5: cache_rpath (dl-load.c:696)
==400562==    by 0x400ABF5: cache_rpath (dl-load.c:677)
==400562==    by 0x400ABF5: _dl_map_object (dl-load.c:2165)
==400562==    by 0x4003494: openaux (dl-deps.c:64)
==400562==    by 0x4ACCC27: _dl_catch_exception (dl-error-skeleton.c:208)
==400562==    by 0x4003C7B: _dl_map_object_deps (dl-deps.c:248)
==400562==    by 0x400EA0E: dl_open_worker_begin (dl-open.c:592)
==400562==    by 0x4ACCC27: _dl_catch_exception (dl-error-skeleton.c:208)
==400562==    by 0x400DF99: dl_open_worker (dl-open.c:782)
==400562==    by 0x4ACCC27: _dl_catch_exception (dl-error-skeleton.c:208)
==400562==    by 0x400E34D: _dl_open (dl-open.c:883)

There are similar errors for "perl -w t/formats_encodings.t".

Running

valgrind --vgdb-error=1 perl -w t/info_tests.t chinese_mixed_with_en_EUC_CN" 

and attaching with gdb, looking at the backtrace, the error arises
via a call from iconv_open which is called from get_encoding_conversion
in main/utils.c.

The address referred to here:

==400562==  Address 0x9307ed1 is 1 bytes inside a block of size 8 alloc'd

points to the string "ORIGIN" which would be 7 bytes including a final
null.  One byte before refers to "$ORIGIN".

I found a similar report at

https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2015216

Apparently it is due to a bug in valgrind that has since been fixed:

https://bugs.kde.org/show_bug.cgi?id=434764
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=947388eb043ea1c44b37df94046e1eee790ad776

I will try to add something to the suppressions file.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]