------- Additional Comments From fruffell at cs dot uwaterloo dot ca  
2006-09-21 23:29 -------
Created an attachment (id=1315)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1315&action=view)
Automatic testcase.

A new testcase, which is automatic for those who don't want to run a hex
editor.  The script attached does:

- generates a C file: contains a guarded invalid 0xa2 mov instruction
- runs the executable which outputs the address of the char array tstStr
- uses this address to patch the 0xa2 mov instruction, inverts the guard
- recompiles and executes the source file, 0xa2 mov instruction now modifies
the string, output is changed from "hello world" to "zello world" (e.g. the mov
instruction successfully updates tstStr with the 32-bit address).
- runs objdump, greps the 0xa2 mov instruction which is incorrectly displayed
with an invalid 64-bit address <--- this is the bug

On my test machine, output is:

[EMAIL PROTECTED] ~/memOffset $ ./gcc-memoffset.sh
00500900
tstStr is "zello world"
  40051e:       67 a2 00 09 50 00 be    addr32 mov %al,0x500900be00500900


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3235

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to