Home Dashboard Directory Help
Search

LOCK prefix encoded by masm to an invalid instruction (causing #UD) by CA 2 LA


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 738878
Opened: 4/25/2012 5:32:06 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

masm ml.exe accepts

lock bts eax, 2

and assembles this instruction to F0 0F BA E8 02, although its NOT available on any CPU.
Execution then leads to an #UD exception.

The LOCK prefix F0 is only allowed, if the FIRST operand is a MEMORY LOCATION. On registers,
this prefix is NOT allowed.

MASM9 / MASM10
Details
Sign in to post a comment.
Posted by Microsoft on 6/1/2012 at 1:44 PM
Thank you for using the Microsoft Macro Assembler (MASM). And thank you for contacting us.

The issue of the LOCK prefix being permitted on an instruction that does not have a memory operand as the destination has been fixed. The fix will be included in the next release.

Visual Studio (and MASM) Product Team
Posted by MS-Moderator10 [Feedback Moderator] on 4/26/2012 at 2:14 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by MS-Moderator01 on 4/25/2012 at 5:54 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.