SIGSEGV with indirect addressing


i have a problem with a piece of assembly code embedded in a c program.

jmp    0x8048408 <main+44>
0x080483e4 <+8>:    pop    %esi
0x080483e5 <+9>:    xor    %eax,%eax
=> 0x080483e7 <+11>:    mov    %ah,0x7(%esi)
0x080483ea <+14>:   mov    $0xffffffff,%ebx
0x080483ef <+19>:   sub    $0xfffffffe,%ebx
0x080483f2 <+22>:   mov    $0xffffffff,%eax
0x080483f7 <+27>:   sub    $0xfffffffb,%eax
0x080483fa <+30>:   int    $0x80
0x080483fc <+32>:   xor    %ebx,%ebx
0x080483fe <+34>:   mov    $0xffffffff,%eax
0x08048403 <+39>:   sub    $0xfffffffe,%eax
0x08048406 <+42>:   int    $0x80
0x08048408 <+44>:   call   0x80483e4 <main+8>

The problem is the <+11> mov line: every time i use parenthesis on a register to get the memory location instead of the register itself, i get a SIGSEGV. I'm starting to think that it's not fault of the code, do you have any idea? Even if i try something like: mov %eax, (%eax); i get the sigsegv error

plz help!

asked on Stack Overflow Aug 13, 2014 by Ryno

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0