[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnulib's malloca use under valgrind
From: |
Nikos Mavrogiannopoulos |
Subject: |
gnulib's malloca use under valgrind |
Date: |
Fri, 17 Mar 2017 09:23:13 +0100 |
Hi,
When we enabled running tests under valgrind in libidn2 [0] we found
out this issue, which involves the unistring/iconv part of the gnulib
code:
==3644== Conditional jump or move depends on uninitialised value(s)
==3644== at 0x4E3EBCC: freea (malloca.c:134)
==3644== by 0x4E40C1D: mem_iconveha (striconveha.c:255)
==3644== by 0x4E40E36: u8_conv_from_encoding (u8-conv-from-enc.c:98)
==3644== by 0x4E41017: u8_strconv_from_encoding (u-strconv-from-
enc.h:34)
==3644== by 0x4E3BDA2: idn2_lookup_ul (lookup.c:454)
==3644== by 0x10C1CD: test_homebrewed (test-lookup.c:941)
==3644== by 0x10C1CD: main (test-lookup.c:1177)
The warning seems to be caused by the malloca() use on this function.
Replacing with malloc(), free() eliminates the uninitialized value
error. Is that warning something expected from the malloca
implementation in gnulib? Should we simply ignore that error via a
valgrind suppression?
regards,
Nikos
[0]. https://gitlab.com/libidn/libidn2/issues/11
- gnulib's malloca use under valgrind,
Nikos Mavrogiannopoulos <=