Skip to content

XmmYmmStateSupport executes xgetbv without checking if instruction is available first #7224

Closed
@cesarblum

Description

@cesarblum

We're seeing test failures on Mac on Travis (and my own personal Mac) on Kestrel test runs. The dotnet process is exiting with exit code 132, which means the process was killed with SIGILL meaning it attempted to execute an illegal instruction.

On lldb I see that XmmYmmStateSupport uses xgetbv, which is not available on older processors (e.g. my Mac is from 2011 and has an Intel Core 2 Duo processor in it):

xUnit.net .NET CLI test runner (64-bit .NET Core osx.10.12-x64)
  Discovering: Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
  Discovered:  Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
  Starting:    Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
Process 18423 stopped
* thread dotnet/coreclr#17: tid = 0x8ece5, 0x0000000101a03646 libcoreclr.dylib`XmmYmmStateSupport + 6, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x0000000101a03646 libcoreclr.dylib`XmmYmmStateSupport + 6
libcoreclr.dylib`XmmYmmStateSupport:
->  0x101a03646 <+6>:  xgetbv 
    0x101a03649 <+9>:  andl   $0x6, %eax
    0x101a0364c <+12>: cmpl   $0x6, %eax
    0x101a0364f <+15>: sete   %al

Metadata

Metadata

Assignees

Labels

blockingMarks issues that we want to fast track in order to unblock other important work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions