-
Notifications
You must be signed in to change notification settings - Fork 61
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
Several reassembly error cases on Ddisasm #54
Comments
Hi @witbring. Thanks for the report! issue 54.1: addr2lineThe first issue, jump table in
I would suggest trying the latest version. issue 54.2: trueThis seems to cause a different problem in the current ddisasm version, I will investigate further. issue 54.3: nm_newThere seems to be something wrong with the tar file that you uploaded, can you upload it again? issue 54.4: dateI see what you are saying. The disassembled instruction in the broader context is:
That issue 54.5: 416.gamessI can't open this .tar.gz file either, can you re-upload? |
Thank you for your reply. I checked the uploaded files but there are no problem to unpack the tar files. issue 54.3: nm_newissue 54.4: dateparse-datetime.s.txt is a relevant assembly file that a compiler generated. issue 54.5: 416.gamess416.gamess.zip (delete link) |
issue 54.3: nm_newFor issue 54.4: dateThanks, this is useful. I'll let you know once a fix is in. issue 54.5: 416.gamessThis also seems to work fine on the current main branch fa15bff
|
Sorry, I re-upload nm_new. |
Hi @witbring, thanks! |
Alright, issue 54.3: nm_new should be solved by 10d66da |
Hi @witbring, I am looking at resolving the remaining issues. I think I have a fix for the Can you provide any information about your build environment and how you build coreutils to generate this code? I believe from the artifacts you have attached that you're using clang 12 to build coreutils-8.30 (x86 pie). Because the C file Thanks! |
Hi @adamjseitz, I'm grade to hear that you fixed the error. Thank you. |
The |
When I tested Ddisasm v1.5.3 (docker image digests a803c9, Apr. 2022) for my research, I found several interesting bug cases.
First, I observe that Ddisasm incorrectly symbolize jump table. As an example, given the jump table entry ‘.long .L4895-.L4896’ found in addr2line.tar.gz of Binutils, Ddisasm recognized the value as a jump table entry but the label value is misidentified.
Second, I found that Ddisasm omits some definitions of labels. For example, given the instruction ‘movl $default_quoting_options, %eax’ found in true.tar.gz (x64 non-pie binary) of Coreutils, Ddisasm reassembled the instruction as ‘mov EAX,OFFSET .L_40b2e0’. However, Ddisasm missed the definition of label ‘. L_40b2e0’ so it causes a compilation error.
Third, I observed that Ddisasm makes wrong symbolic expressions so some recompiled binaries refer to incorrect addresses. As an example, given the disassembly code ‘.long .L1543@GOTOFF’ found in nm_new.tar.gz (x86 pie binary) of binutils, Ddisasm symbolized the pointer as ‘.long .L_e4b5-.L_785f1’
Also, I observed that Ddisasm makes some mistakes when it generates got-relative labels. As an example, given the instruction ‘addl $yydefgoto@GOTOFF, %eax’ found in date.tar.gz (x86 pie binary) of coreutils, ddiasm the immediate value as ‘.L_11eca@GOTOFF’. However, the ‘yydefgoto’ is placed at 0x11ee6 not 0x11eca. Also, I calculated the got relative address and concluded that Ddisasm misidentified the label value.
Lastly, I observed that Ddisasm fails on symbolization when it handles large size binary. For example, Ddisasm fails on symbolizing rip-relative addressing when it reassembled 416.gamess.tar.gz (delete link) of spec cpu 2006. As a result, it causes tremendous false negative errors.
The text was updated successfully, but these errors were encountered: