Skip to content

Conversation

@trevor-e
Copy link
Member

@trevor-e trevor-e commented Jan 30, 2026

We had a bug where in some rare cases we would compare a symbol to a neighbor in a different segment, which in this case produced a negative symbol size and caused a pydantic validation error. Now we ensure only symbols within the same segment are compared since some sections can have colliding names.

Tested the affected customer build and our hackernews fixture and seems correct.

https://sentry.sentry.io/issues/7215094878/events/c311e7b4e31a4ff98783579d17c581b9/#logs

same_section = (
next_sym_section
and next_sym_section.segment
and next_sym_section.segment.name == section.segment.name
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the core fix, we had a case where a symbol got compared to a section in a different segment.

address=data.address,
size=data.size,
)
symbol_sizes = [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some light cleanup mixed in here as well, left a comment on the bug fix.

@trevor-e trevor-e marked this pull request as ready for review January 30, 2026 19:38
@trevor-e trevor-e merged commit 48de3b1 into main Jan 30, 2026
19 checks passed
@trevor-e trevor-e deleted the telkins/fix-negative-symbol-sizes branch January 30, 2026 20:27
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.

3 participants