aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authorSergei Trofimovich <siarheit@google.com>2023-09-28 20:20:31 +0100
committerSergei Trofimovich <siarheit@google.com>2023-09-29 09:50:00 +0100
commit7525707c5f3edb46958c4fdfbe30de5ddfa8923a (patch)
treeabb3184e5087e5466e3cf89a9ac203d387497de7 /gcc/function.h
parentbcc97edf8c9e40232fa30e7f0070057b6516fd77 (diff)
downloadgcc-7525707c5f3edb46958c4fdfbe30de5ddfa8923a.zip
gcc-7525707c5f3edb46958c4fdfbe30de5ddfa8923a.tar.gz
gcc-7525707c5f3edb46958c4fdfbe30de5ddfa8923a.tar.bz2
ggc: do not wipe out unrelated data via gt_ggc_rtab [PR111505]
There are 3 GC root tables: gt_ggc_rtab gt_ggc_deletable_rtab gt_pch_scalar_rtab `deletable` and `scalar` tables are both simple: each element always contains a pointer to the beginning of the object and it's size is the full object. `rtab` is different: it's `base` is a pointer in the middle of the struct and `stride` points to the next GC pointer in the array. Before the change there were 2 problems: 1. We memset()ed not just pointers but data around them. 2. We wen out of bounds of the last object described by gt_ggc_rtab and triggered bootstrap failures in profile and asan bootstraps. After the change we handle only pointers themselves like the rest of ggc-common.cc code. gcc/ PR middle-end/111505 * ggc-common.cc (ggc_zero_out_root_pointers, ggc_common_finalize): Add new helper. Use helper instead of memset() to wipe out pointers.
Diffstat (limited to 'gcc/function.h')
0 files changed, 0 insertions, 0 deletions