[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Valgrind is complaining unitialized values in freea (malloca.c:135)
From: |
Tim Rühsen |
Subject: |
Re: Valgrind is complaining unitialized values in freea (malloca.c:135) |
Date: |
Tue, 22 Aug 2017 17:52:35 +0200 |
User-agent: |
KMail/5.2.3 (Linux/4.12.0-1-amd64; KDE/5.28.0; x86_64; ; ) |
On Dienstag, 22. August 2017 06:11:41 CEST Marc Nieper-Wißkirchen wrote:
> In freea in malloca.c, a possibly uninitialized indicator word is used for
> a comparison so that Valgrind reports: "Conditional jump or move depends on
> uninitialised value(s)".
>
> Valgrind is not smart enough to understand the logic in freea.
>
> It would be nice if the warning could be silenced, either by amending freea
> slightly (it seems that a similar thing has already been done for Clang
> warnings) or by reporting the issue to the Valgrind developers so that they
> can special-case gnulib's freea.
I also see several false positives from clang's Undefined Sanitizer due to
alloca 'magic' (reallocations on stack space ?). This might not be directly
related, but I think there is a common coding pattern.
glob.c:1738:23: runtime error: index 64 out of bounds for type 'char *[64]'
#0 0x557545 in glob_in_dir /home/tim/src/wget2/lib/glob.c:1738:40
#1 0x54ded1 in rpl_glob /home/tim/src/wget2/lib/glob.c:1306:16
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior glob.c:1738:23 in
glob.c:1739:27: runtime error: index 64 out of bounds for type 'char *[64]'
#0 0x5575d4 in glob_in_dir /home/tim/src/wget2/lib/glob.c:1739:27
#1 0x54ded1 in rpl_glob /home/tim/src/wget2/lib/glob.c:1306:16
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior glob.c:1739:27 in
glob.c:1811:21: runtime error: index 64 out of bounds for type 'char *[64]'
#0 0x55845e in glob_in_dir /home/tim/src/wget2/lib/glob.c:1811:21
#1 0x54ded1 in rpl_glob /home/tim/src/wget2/lib/glob.c:1306:16
Regards, Tim
signature.asc
Description: This is a digitally signed message part.
- Valgrind is complaining unitialized values in freea (malloca.c:135), Marc Nieper-Wißkirchen, 2017/08/22
- Re: Valgrind is complaining unitialized values in freea (malloca.c:135),
Tim Rühsen <=
- Re: Valgrind is complaining unitialized values in freea (malloca.c:135), Marc Nieper-Wißkirchen, 2017/08/22
- Re: clang's Undefined Sanitizer, Bruno Haible, 2017/08/22
- Re: clang's Undefined Sanitizer, Paul Eggert, 2017/08/22
- Re: clang's Undefined Sanitizer, Adhemerval Zanella, 2017/08/22
- Re: clang's Undefined Sanitizer, Paul Eggert, 2017/08/22
- Re: clang's Undefined Sanitizer, Adhemerval Zanella, 2017/08/22
- Re: clang's Undefined Sanitizer, Paul Eggert, 2017/08/23
- Re: clang's Undefined Sanitizer, Bruno Haible, 2017/08/24
- Re: clang's Undefined Sanitizer, Benno Schulenberg, 2017/08/24
- Re: clang's Undefined Sanitizer, Benno Schulenberg, 2017/08/27