New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use AddressSpace equals method for checks #6403
Comments
An update: patching it locally to use |
Could you please provide some additional details:
|
Sure thing:
Also, this is cropping up I believe in the following sequence:
Thanks! |
The issue may be a merge code issue which is suppose to work with equivalent addresses and not directly compare objects/addresses between two programs. I will need to check code in either case. Please ignore my question about the source of the AssertException which you pointed to in your original post. Do you have more of the stack trace you can share? (i.e., where was |
The use of |
I recall it coming from here specifically: ghidra/Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/RegisterMergeManager.java Line 207 in cae9190
I don't have the original traceback handy since I locally patched the code and the merge succeeded, but may be able to reproduce it. I've had this specific issue crop up twice so far on this project. This is on a single program, and in my instance, the start and end addresses were the same space (named after the overlay, with the same space ID), and the start came before the end, both within the valid range for the overlay. I'm not entirely sure how I got different instances, it's possible that I created something, undid it, saved, then tried to merge. |
I was able to pull the traceback from the debug log; the summary version is:
|
Merge works with multiple program instances which will each have their own overlay address space instances. Merge is not suppose to mix addresses and must carefully perform cross-lookups for such things. It's all rather confusing in the code because its never obvious which address factory owns a given overlay space. Hopefully your trace will help isolate. |
I believe the
.equals()
method, rather than equality comparison via!=
, should be used here and several other places in this file (and possibly in other places within the project):ghidra/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/AbstractStoredProgramContext.java
Line 251 in bf3fbbc
I'm running into the
AssertException
below when the RegisterMergeManager is invoked on a shared project that uses Overlays. Usingjdb
, I can see the address spaces have the same names and IDs,.equals()
returns true, but==
is false. This causes merge to fail.I'm using Ghidra 10.3 but I believe the bug is present on master currently.
The text was updated successfully, but these errors were encountered: