#11 jmp word/dword generates bad code

closed-invalid
nobody
None
8
2002-05-21
2002-05-20
No

Using the word or dword qualifiers to control the size
of a near jump produces illegal code:

27 00000042 66E90801 jmp
dword faraway ; Explicit

... NASM produces the 66 prefix, but does not change
the size of the operand to 32 bits (the correct
encoding is 66E908010000). As a result, the bytes
immediately after the instruction will be interpreted
as part of the address.

This is bad.

Discussion

  • H. Peter Anvin

    H. Peter Anvin - 2002-05-21
    • status: open --> closed
     
  • H. Peter Anvin

    H. Peter Anvin - 2002-05-21

    Logged In: YES
    user_id=58697

    Fix checked into CVS.

     
  • H. Peter Anvin

    H. Peter Anvin - 2002-05-21
    • status: closed --> closed-invalid
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks