diff options
author | Sergei Trofimovich <siarheit@google.com> | 2020-08-02 12:03:55 +0100 |
---|---|---|
committer | Sergei Trofimovich <siarheit@google.com> | 2020-08-02 19:35:47 +0100 |
commit | 6e46b3f3da5c03bc529b3690dd0995927feb9142 (patch) | |
tree | a55dc90d1d343070ee18bfdf8d991e6e3e1ac7db /gcc/value-range.h | |
parent | b3b2bf98fffb0760120285e7d883c082fa3c2187 (diff) | |
download | gcc-6e46b3f3da5c03bc529b3690dd0995927feb9142.zip gcc-6e46b3f3da5c03bc529b3690dd0995927feb9142.tar.gz gcc-6e46b3f3da5c03bc529b3690dd0995927feb9142.tar.bz2 |
var-tracking: fix uninitialised use of 'in_pending' [PR96404]
r11-2447-g:1212cfad093 ("Improve var-tracking dataflow
iteration order") changed 'in_pending' initialization
from:
in_pending = sbitmap_alloc (last_basic_block_for_fn (cfun));
bitmap_ones (in_pending);
to more complex partial bit population algorithm. Due to presence
of uninitialized bits gcc started injecting extra debug entries
in seemigly arbitrary locations and started failing stage2/stage3
bootstrap comparison.
valgrind detected unilitialized bits as:
Conditional jump or move depends on uninitialised value(s)
at 0xDBED3B: vt_find_locations() (var-tracking.c:7230)
by 0xDBF2FB: variable_tracking_main_1() (var-tracking.c:10519)
...
Uninitialised value was created by a heap allocation
at 0x483779F: malloc (vg_replace_malloc.c:307)
by 0x14EE80B: xmalloc (xmalloc.c:147)
by 0x14911F9: sbitmap_alloc(unsigned int) (sbitmap.c:51)
...
The fix explicitly initializes 'in_pending' bitmap with zeros.
2020-08-02 Sergei Trofimovich <siarheit@google.com>
gcc/
PR bootstrap/96404
* var-tracking.c (vt_find_locations): Fully initialize
all 'in_pending' bits.
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions