public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/106745] New: segfault in bpf_core_get_sou_member_index
@ 2022-08-26 4:45 james.hilliard1 at gmail dot com
2022-08-26 20:16 ` [Bug target/106745] " david.faust at oracle dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: james.hilliard1 at gmail dot com @ 2022-08-26 4:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106745
Bug ID: 106745
Summary: segfault in bpf_core_get_sou_member_index
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: james.hilliard1 at gmail dot com
Target Milestone: ---
Created attachment 53510
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53510&action=edit
bug report output
Running into this on master with the following patch(seems unrelated to the
crash):
https://patchwork.ozlabs.org/project/gcc/patch/87a681d7tf.fsf_-_@oracle.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/106745] segfault in bpf_core_get_sou_member_index
2022-08-26 4:45 [Bug c/106745] New: segfault in bpf_core_get_sou_member_index james.hilliard1 at gmail dot com
@ 2022-08-26 20:16 ` david.faust at oracle dot com
2022-08-29 20:46 ` cvs-commit at gcc dot gnu.org
2023-01-06 14:17 ` jemarch at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: david.faust at oracle dot com @ 2022-08-26 20:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106745
David Faust <david.faust at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |david.faust at oracle dot com
--- Comment #1 from David Faust <david.faust at oracle dot com> ---
Thanks, I've reproduced the failure and found the issue.
The code which generates the CO-RE relocations isn't correctly handling
anonymous inner struct/union decls. So for example:
struct core_reloc_flavors___weird {
struct {
int b;
};
union {
int a;
int c;
};
};
Asking to generate a CO-RE relo for access to a, b or c here will trigger the
SEGV. Working on a fix.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/106745] segfault in bpf_core_get_sou_member_index
2022-08-26 4:45 [Bug c/106745] New: segfault in bpf_core_get_sou_member_index james.hilliard1 at gmail dot com
2022-08-26 20:16 ` [Bug target/106745] " david.faust at oracle dot com
@ 2022-08-29 20:46 ` cvs-commit at gcc dot gnu.org
2023-01-06 14:17 ` jemarch at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-08-29 20:46 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/106745] segfault in bpf_core_get_sou_member_index
2022-08-26 4:45 [Bug c/106745] New: segfault in bpf_core_get_sou_member_index james.hilliard1 at gmail dot com
2022-08-26 20:16 ` [Bug target/106745] " david.faust at oracle dot com
2022-08-29 20:46 ` cvs-commit at gcc dot gnu.org
@ 2023-01-06 14:17 ` jemarch at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jemarch at gcc dot gnu.org @ 2023-01-06 14:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106745
Jose E. Marchesi <jemarch at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Jose E. Marchesi <jemarch at gcc dot gnu.org> ---
This is fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-06 14:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 4:45 [Bug c/106745] New: segfault in bpf_core_get_sou_member_index james.hilliard1 at gmail dot com
2022-08-26 20:16 ` [Bug target/106745] " david.faust at oracle dot com
2022-08-29 20:46 ` cvs-commit at gcc dot gnu.org
2023-01-06 14:17 ` jemarch at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).