pypy3 didn't support ctypes bit-fields
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 3
Description
https://github.com/iovisor/bcc/blob/35cb9fd1cb0884e7a1fed1d3c01314655e40482c/src/python/bcc/disassembler.py#L26-L33
`BPFInstrFields` create fields with bit-fields, causing pypy binding failed.
```python
for item in typedict.get('_anonymous_', []):
if item not in dict(typedict['_fields_']):
raise AttributeError("Anonymous field not found")
```
Raising ValueError:
```
>>>> dict(['a', 'b', 'c'])
Traceback (most recent call last):
File "", line 1, in
ValueError: sequence of pairs expected
```
I do a workaround with remove bit-fields and it works fine (in my case). Will it cause some issue?
Thanks.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read src/python/bcc/disassembler.py at lines 26-33 and reproduce the PyPy3 binding failure involving BPFInstrFields bit-fields and the shown dict conversion. Compare the reported workaround with the existing ctypes definition; done means the PyPy binding loads successfully without breaking the disassembler's field behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100