[Bug target/117447] ICE in BPF GCC-trunk segmentation fault

2026-01-15 Thread dfaust at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117447

David Faust  changed:

   What|Removed |Added

   Target Milestone|--- |15.0

[Bug target/117447] ICE in BPF GCC-trunk segmentation fault

2026-01-09 Thread jemarch at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117447

Jose E. Marchesi  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #5 from Jose E. Marchesi  ---
This should be fixed by:

0e1382034 bpf: avoid possible null deref in btf_ext_output [PR target/117447]

[Bug target/117447] ICE in BPF GCC-trunk segmentation fault

2024-11-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117447

--- Comment #4 from GCC Commits  ---
The master branch has been updated by David Faust :

https://gcc.gnu.org/g:0e1382034246a594f1da8dbaee97c4a06743f31a

commit r15-5026-g0e1382034246a594f1da8dbaee97c4a06743f31a
Author: David Faust 
Date:   Thu Nov 7 09:27:07 2024 -0800

bpf: avoid possible null deref in btf_ext_output [PR target/117447]

The BPF-specific .BTF.ext section is always generated for BPF programs
if -gbtf is specified, and generating it requires BTF information and
assumes that the BTF info has already been generated.

Compiling non-C languages to BPF is not supported, nor is generating
CTF/BTF for non-C.  But, compiling another language like C++ to BPF
with -gbtf specified meant that we would try to generate the .BTF.ext
section anyway, and then ICE because no BTF information was available.

Add a check to bail out of btf_ext_output if the TU CTFC does not exist,
meaning no BTF info is available.

gcc/
PR target/117447
* config/bpf/btfext-out.cc (btf_ext_output): Bail if TU CTFC is
null.

[Bug target/117447] ICE in BPF GCC-trunk segmentation fault

2024-11-06 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117447

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #3 from Sam James  ---
(In reply to Yuchang Su from comment #0)

Did you hit this organically or are you fuzzing? If you're fuzzing either BPF
or just the CTF/BTF formats in general, please focus on C with `-gctf` or
`-gbtf` for now, as that'll have more interesting results.

[Bug target/117447] ICE in BPF GCC-trunk segmentation fault

2024-11-05 Thread jemarch at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117447

Jose E. Marchesi  changed:

   What|Removed |Added

   Last reconfirmed||2024-11-06
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #2 from Jose E. Marchesi  ---
g++ is indeed not supported by the BPF back-end.  It would be nice to emit a
fatal error instead of a segmentation fault though.

[Bug target/117447] ICE in BPF GCC-trunk segmentation fault

2024-11-05 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117447

Sam James  changed:

   What|Removed |Added

 CC||david.faust at oracle dot com,
   ||ibhagat at gcc dot gnu.org,
   ||jemarch at gcc dot gnu.org

--- Comment #1 from Sam James  ---
I thought we didn't support C++ for bpf yet. CTF definitely doesn't support it.