d0c-s4vage / d0c-s4vage/py010parser
On (recent?) Macs, CPP needs to be invoked as "cpp -xc++"
- Dominant language
- Python
- Stars
- 54
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Hello everyone,
We are currently building a fuzzer for binary formats on top of py010parser.
On my Mac (MacOS 10.15.6), py010parser fails, reporting a syntax error as soon as the first '//' comment is parsed in the .bt file.
This is because on my Mac, "cpp" (/usr/bin/cpp) by default does not strip comments. One needs to invoke it as "cpp -xstdc++".
I can work around this by setting cpp_args="-xstdc++" for parsing, but you may wish to set up the default for cpp_args accordingly.
Cheers,
Andreas
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how py010parser invokes the C preprocessor and where the default cpp_args value is set. Reproduce the reported failure on macOS, verify the appropriate preprocessor argument, and confirm that parsing .bt files with // comments succeeds without requiring a caller-supplied cpp_args override.
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