Crash with struct/union combo in leaf definition
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
The following code causes a stack overflow and subsequent crash:
``` python
from bcc import BPF
text = """
struct routing_key_2 {
u32 key_field_0;
};
enum routing_actions_1 {
routing_nop,
};
struct routing_value_3 {
enum routing_actions_1 action;
union {
struct {
} nop;
} u;
};
BPF_TABLE("hash", struct routing_key_2, struct routing_value_3, routing, 512);
"""
b = BPF(text=text)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the Python reproducer in the issue and inspect the BCC handling of embedded BPF type definitions, especially the struct/union combination. Done means this input no longer causes a stack overflow or crash, while existing BPF table behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100