Skip to content

Conversation

@jodaco
Copy link
Contributor

@jodaco jodaco commented Aug 15, 2025

The parser in symbolizer presently breaks out of the for loop if it receives a hex value, to indicate it has reached the next PC, or the sentinel.

The condition for breaking the loop is:
if len(ln) > 3 && ln[0] == '0' && ln[1] == 'x', this does not catch 0xc, for example

len(ln) >= 3 && ln[0] == '0' && ln[1] == 'x' is correct for such cases.

Fixes #6290


Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md


@google-cla
Copy link

google-cla bot commented Aug 15, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@a-nogikh
Copy link
Collaborator

Thanks!

Please note the following CI error:

Error: Wrong commit subject format: 'pkg/symbolizer: Fix parser handling of small hex values'. Please use 'main/affected/package: short change description'. See docs/contributing.md for details. Regex pattern used to check commit subjects is '^(Revert "|(([a-z0-9/_.-]+|Makefile|CONTRIBUTORS|README.md)(, )?)+:\ [^A-Z].+[^.]$)'.

The commit title should be pkg/symbolizer: fix parser handling of small hex values.

I am curious though what are the cases when addr2line would return the 0xc (or anything 0x0-0xf). Is it for modules?

@jodaco
Copy link
Contributor Author

jodaco commented Aug 18, 2025

Thanks!

Please note the following CI error:

Error: Wrong commit subject format: 'pkg/symbolizer: Fix parser handling of small hex values'. Please use 'main/affected/package: short change description'. See docs/contributing.md for details. Regex pattern used to check commit subjects is '^(Revert "|(([a-z0-9/_.-]+|Makefile|CONTRIBUTORS|README.md)(, )?)+:\ [^A-Z].+[^.]$)'.

The commit title should be pkg/symbolizer: fix parser handling of small hex values.

I am curious though what are the cases when addr2line would return the 0xc (or anything 0x0-0xf). Is it for modules?

The modules have these values. I'll fix the formatting when I get a chance. addr2line will just return what it was handed, and the parser was ignoring 0x0-0xf in the main for loop and not breaking out when it was supposed to.

The parser in symbolizer was incorrectly handling values of 0x0-0xf.

Fixes google#6290
@jodaco jodaco force-pushed the fix-pkg-symbolizer-parser branch from 5411d80 to bcad6d0 Compare August 18, 2025 19:45
@a-nogikh a-nogikh enabled auto-merge August 18, 2025 20:35
@a-nogikh a-nogikh added this pull request to the merge queue Aug 18, 2025
Merged via the queue into google:master with commit 523f460 Aug 18, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pkg/symbolizer: Parser sometimes begins parsing with symbols or filename:linenum rather than PC

2 participants