[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: clang's Undefined Sanitizer
From: |
Bruno Haible |
Subject: |
Re: clang's Undefined Sanitizer |
Date: |
Tue, 22 Aug 2017 18:49:26 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-91-generic; KDE/5.18.0; x86_64; ; ) |
[Changing the subject, as this is an unrelated topic.]
Hi Tim,
> 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
It obviously does not handle the 'struct globnames' allocated with
the FLEXSIZEOF macro (lines 1719..1732).
Bruno
- 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, 2017/08/22
- 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 <=
- 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
- Re: clang's Undefined Sanitizer, Bruno Haible, 2017/08/27
- Re: clang's Undefined Sanitizer, Bruno Haible, 2017/08/24