diff options
| author | blasty <blasty@local> | 2026-07-25 14:48:21 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-25 14:48:21 +0200 |
| commit | 603771a57d9e4ff8c4f5e64e37944e54530ca16e (patch) | |
| tree | ed319dad43a2ad720885e3b323e5eeda9edcde52 /experiments | |
| parent | palette: cut the per-keystroke cost of project-wide symbol search (diff) | |
| download | ida-tui-603771a57d9e4ff8c4f5e64e37944e54530ca16e.tar.gz ida-tui-603771a57d9e4ff8c4f5e64e37944e54530ca16e.tar.xz ida-tui-603771a57d9e4ff8c4f5e64e37944e54530ca16e.zip | |
fix: project-wide search crashed on a name shared by two binaries
TypeError: '<' not supported between instances of 'Hit' and 'Hit'.
The rank tuple built for project scope ended with the Hit itself, so when two
binaries contain the SAME symbol name the first three fields (match position,
length, text) tied and sort() fell through to comparing Hit dataclasses, which
aren't orderable. Shared names — main, textdomain, the whole libc surface — are
the norm in a project, so this fired almost immediately.
Sort on an explicit key that stops at the orderable fields and breaks ties on
(binary, addr), which also makes the ordering deterministic instead of
input-order dependent.
Regression test in test_project_ui.py, where 'main' exists in both echo and cat:
widen to project scope and assert the shared name is found in both binaries — it
crashed before the fix. 20/20 there, suite 191/0.
Diffstat (limited to 'experiments')
0 files changed, 0 insertions, 0 deletions
