Skip to content

x86 diff in displacement on data is ignored #422

Closed

Description

@tomsons26

gMallocs is in .data, its a ->field_38 access is treated as without the member access.
Not sure when this regression started, the "Function Reloc Diffs" dropdown doesn't seem to do anything to help, maybe it's refactoring done some time ago is what broke it.
Extern diffs seem to work still

Assembled object
objdiffissue_displacement.zip

Image

Assembly:
ml /c /coff /Zf /Cx /Cp objdiffissue_displacement.asm

.386P
.model flat

.stack 4096

assume fs:nothing

extern gExtMallocs:dword

.data

gMallocs DD ?

.code

_withdisplacement proc
    mov esi, [gMallocs+38h]
    
    ret

_withdisplacement endp


_nodisplacement proc
    mov esi, [gMallocs+0h]
    
    ret

_nodisplacement endp

_extwithdisplacement proc
    mov esi, [gExtMallocs+38h]
    
    ret

_extwithdisplacement endp


_extnodisplacement proc
    mov esi, [gExtMallocs+0h]
    
    ret

_extnodisplacement endp

end

Activity

  1. tomsons26 commented on Oct 18, 2026

    @tomsons26
    ContributorAuthor

    v3.8.0 broke this, works in v3.7.3
    @LagoLunatic changed how reloc code works with this version, that's likely where this broke

    Hmm no im seeing the issue in older versions too, did this ever work then...

  2. LagoLunatic commented on Oct 18, 2026

    @LagoLunatic
    Collaborator

    You only uploaded one test object, the target with the +0x38. Need both objects to test this.

  3. LagoLunatic commented on Oct 18, 2026

    @LagoLunatic
    Collaborator

    Or wait, are you saying that the one object you uploaded should be diffed with itself, like this?

    Image

    If so I don't see any bug, on default settings it shows the expected diff. You must have messed with your config settings.

  4. tomsons26 commented on Oct 18, 2026

    @tomsons26
    ContributorAuthor

    I do have
    "options": {
    "functionRelocDiffs": "data_value"
    }
    in the objdiff.json, seems it's overriding the dropdown then?
    Thought it was a preference not a unconditional override

  5. LagoLunatic commented on Oct 18, 2026

    @LagoLunatic
    Collaborator

    I wasn't aware you could override user preferences with objdiff.json like that. Apparently it was added in #263, and mostly still works, but the visual indicator in the GUI that the option has been overriden does not seem to appear anymore for some reason. So I'm closing this, but I'll open an issue for the visual regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions