Skip to content

diff_order_for_section_name warning instead of crash - #407

Draft
HaydnTrigg wants to merge 1 commit into
encounter:mainfrom
HaydnTrigg:bugfix/diff_order_for_section_name
Draft

diff_order_for_section_name warning instead of crash#407
HaydnTrigg wants to merge 1 commit into
encounter:mainfrom
HaydnTrigg:bugfix/diff_order_for_section_name

Conversation

@HaydnTrigg

@HaydnTrigg HaydnTrigg commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Commit f2f813e added in a function diff_order_for_section_name which crashes out with the error message Failed to find right side symbol for paired left side symbol

This change makes this function log a warning instead of crashing out and also provides context for the expected symbol name and section that is expected.

v3.8.1:
image

v3.7.1:
image

Patched:
image

@LagoLunatic

Copy link
Copy Markdown
Collaborator

Is there any scenario where a left symbol will be paired to a right symbol but that right symbol will not be paired to a left symbol? That doesn't sound correct to me and I believe it would cause a number of subtle issues in other parts of objdiff which assume that symbols are paired both ways, which is why I intentionally made it crash here instead of ignoring the bug and incorrectly showing no diff.

A crash is more likely to be reported as a bug than a warning. Actually, where does objdiff even log to, anyway? I've only seen its warnings in the console when running it in debug mode, which most users won't see at all and won't be able to report.

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.

2 participants