[Bug target/106745] segfault in bpf_core_get_sou_member_index
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 29 20:46:37 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106745
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Faust <dfaust@gcc.gnu.org>:
https://gcc.gnu.org/g:b504149d2c92ddfcfab62ea6d1ed49ae72493e38
commit r13-2255-gb504149d2c92ddfcfab62ea6d1ed49ae72493e38
Author: David Faust <david.faust@oracle.com>
Date: Mon Aug 29 11:21:52 2022 -0700
bpf: handle anonymous members in CO-RE reloc [PR106745]
The old method for computing a member index for a CO-RE relocation
relied on a name comparison, which could SEGV if the member in question
is itself part of an anonymous inner struct or union.
This patch changes the index computation to not rely on a name, while
maintaining the ability to account for other sibling fields which may
not have a representation in BTF.
gcc/ChangeLog:
PR target/106745
* config/bpf/coreout.cc (bpf_core_get_sou_member_index): Fix
computation of index for anonymous members.
gcc/testsuite/ChangeLog:
PR target/106745
* gcc.target/bpf/core-pr106745.c: New test.
More information about the Gcc-bugs
mailing list