Skip to content
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

MSVC name mangling seems to cause an exception. #116

Open
OmniBlade opened this issue Jul 5, 2023 · 1 comment
Open

MSVC name mangling seems to cause an exception. #116

OmniBlade opened this issue Jul 5, 2023 · 1 comment

Comments

@OmniBlade
Copy link
Contributor

The following asm snippet seems to cause an exception when used within decomp.me where I'm trying to implement msvc support. When the function is changed to no longer be part of a class the exception dissappears and the diff works:

i386-pc-msdosdjgpp-objdump --disassemble --disassemble-zeroes --line-numbers --start-address=0 -m i386 --no-show-raw-insn /mnt/d/Code/teststraw.o

/mnt/d/Code/teststraw.o:     file format coff-go32


Disassembly of section .text:

00000000 <?Get_From@Straw@@EAEXPAV1@@Z>:
   0:   push   %esi
   1:   mov    0x8(%esp),%esi
   5:   push   %edi
   6:   mov    %ecx,%edi
   8:   cmp    %esi,0x4(%edi)
   b:   je     3e <?Get_From@Straw@@EAEXPAV1@@Z+0x3e>
   d:   test   %esi,%esi
   f:   je     26 <?Get_From@Straw@@EAEXPAV1@@Z+0x26>
  11:   mov    0x8(%esi),%ecx
  14:   test   %ecx,%ecx
  16:   je     26 <?Get_From@Straw@@EAEXPAV1@@Z+0x26>
  18:   mov    (%ecx),%eax
  1a:   push   $0x0
  1c:   call   *0x4(%eax)
  1f:   movl   $0x0,0x8(%esi)
  26:   mov    0x4(%edi),%eax
  29:   test   %eax,%eax
  2b:   je     34 <?Get_From@Straw@@EAEXPAV1@@Z+0x34>
  2d:   movl   $0x0,0x8(%eax)
  34:   test   %esi,%esi
  36:   mov    %esi,0x4(%edi)
  39:   je     3e <?Get_From@Straw@@EAEXPAV1@@Z+0x3e>
  3b:   mov    %edi,0x8(%esi)
  3e:   pop    %edi
  3f:   pop    %esi
  40:   ret    $0x4
  43:   nop
  44:   nop
  45:   nop
  46:   nop
  47:   nop
  48:   nop
  49:   nop
  4a:   nop
  4b:   nop
  4c:   nop
  4d:   nop
  4e:   nop
  4f:   nop
@simonlindholm
Copy link
Owner

Sorry for the delayed response. I can't reproduce this now when trying... If you're still seeing this, can you post a .o file and asm-differ invocation that triggers the exception? What is the exception that's thrown?

Or, are you uploading that asm literally as is? That's not expected to work -- objdump output is generally not reassemblable. We've talked about adding a .o file upload mode to decomp.me to make this simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants