GrammaTech / ddisasm

A fast and accurate disassembler
https://grammatech.github.io/ddisasm/
GNU Affero General Public License v3.0
645 stars 60 forks source link

d3dcompiler_47.dll fails disassembly #23

Closed jrmuizel closed 3 years ago

jrmuizel commented 3 years ago
Building the initial gtirb representation  (58ms)
Decoding the binary WARNING: Missing `alignment' AuxData table
 (51s)
Disassembling (424s)
Populating gtirb representation  (30s)
Computing intra-procedural SCCs  (3s)
Computing no return analysis  (43s)
Detecting additional functions  (8s)
Printing assembler WARNING: found overlapping element at address 1802e7919
The --layout option to gtirb-pprinter can fix overlapping elements.
WARNING: found overlapping element at address 1802e7925
The --layout option to gtirb-pprinter can fix overlapping elements.
WARNING: found overlapping element at address 1802e792d
The --layout option to gtirb-pprinter can fix overlapping elements.
WARNING: found overlapping element at address 1802e7934
The --layout option to gtirb-pprinter can fix overlapping elements.
 (22s)
The conflicts between the following code blocks could not be resolved:
1802e7915 - 1802e7919
1802e7919 - 1802e7921
1802e7924 - 1802e7925
1802e792c - 1802e792d
1802e7931 - 1802e7934
Aborting

This is with ddisasm 1.4 (1cbb62c)

You can find a copy of d3dcompiler_47.dll in http://ftp.mozilla.org/pub/firefox/nightly/2021/02/2021-02-26-21-45-01-mozilla-central/firefox-88.0a1.en-US.win64.zip

jrmuizel commented 3 years ago

Here's the Ghidra disassembly for the relevant area of code:

                             ?OpenGlobals@DBI1@@UEAAHPEAPEAUGSI@@@Z       XREF[1]:     180353ef2(*)  
                             DBI1::OpenGlobals
       1802e7910 48 89 5c        MOV        qword ptr [RSP + local_res10],RBX
                 24 10
       1802e7915 56              PUSH       RSI
       1802e7916 48 83 ec 20     SUB        RSP,0x20
       1802e791a 48 8b 81        MOV        RAX,qword ptr [this + 0x1d8]
                 d8 01 00 00
       1802e7921 48 8b f2        MOV        RSI,param_1
       1802e7924 48 8b d9        MOV        RBX,this
       1802e7927 48 85 c0        TEST       RAX,RAX
       1802e792a 74 13           JZ         LAB_1802e793f
       1802e792c 48 89 02        MOV        qword ptr [param_1],RAX
       1802e792f b8 01 00        MOV        EAX,0x1
                 00 00
       1802e7934 48 8b 5c        MOV        RBX,qword ptr [RSP + local_res10]
                 24 38
       1802e7939 48 83 c4 20     ADD        RSP,0x20
       1802e793d 5e              POP        RSI
       1802e793e c3              RET
kwarrick commented 3 years ago

@jrmuizel Thank you for reporting this. I am looking into it!

kwarrick commented 3 years ago

@jrmuizel This failure should be fixed now.

jrmuizel commented 3 years ago

With e9a25fd2fcef7e6814087245940c1f60702c81a7?

jrmuizel commented 3 years ago

Looks like it.