Bug 50189 - SGEN XMM scanning: Linux/Intel (32 + 64)
Summary: SGEN XMM scanning: Linux/Intel (32 + 64)
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: 4.8.0 (C9)
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Vlad Brezae
Depends on:
Reported: 2016-12-15 20:51 UTC by Andi McClure
Modified: 2017-10-19 19:35 UTC (History)
7 users (show)

Tags: bugpool-archive
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andi McClure 2016-12-15 20:51:11 UTC
When scanning the registers+stack for an SGEN collection, we do not currently scan the XMM (SSE) registers on Linux for Intel.

We do scan FPU registers on Linux for ARM64 ( https://github.com/mono/mono/pull/3764 ). We do not have proof that XMM needs to be scanned on Linux for Intel, however, since Clang has been spotted using XMM registers to accelerate memcpys on Darwin/Intel32 and Darwin/Intel64, and GCC has been spotted using the FPU registers for register spilling on Linux/ARM, it is very likely one or more compilers is using the XMM registers on Linux/Intel and we just haven't caught it yet.

Because this creates high risk for hard-to-spot bugs it should be fixed for C9.
Comment 1 Rodrigo Kumpera 2016-12-15 21:00:56 UTC
Hey Jon,

Did this land on C9?
Comment 2 Andi McClure 2016-12-15 21:02:03 UTC
My understanding is Jon Purdy's patch landed in C9, but Jon Purdy's patch was Darwin/Intel and we still need a patch for Linux/Intel. Is this incorrect?
Comment 3 Jon Purdy 2016-12-15 21:14:37 UTC
I covered Darwin+Intel. It’s in master, not in mono-4.8.0-branch. The patch should be identical to https://github.com/mono/mono/pull/4134. Shall I make another PR for 4.8?

The original PR has my attempt at fixes for Linux/Windows+Intel. https://github.com/mono/mono/pull/3364
Comment 4 Andi McClure 2016-12-16 18:54:27 UTC
Jon, please do backport Darwin/Intel to 4.8. Thanks.
Comment 5 Jon Purdy 2016-12-16 20:15:12 UTC
Comment 6 Luis Aguilera 2017-02-18 00:21:28 UTC
C9 is now closed. We'll move this bug to the next scheduled milestone, "15.1". We'll continue working on these issues, and will attempt to resolve them ASAP.
Comment 8 Rodrigo Kumpera 2017-06-19 15:44:38 UTC
Moving back to Ludovic to find someone to work on it.
Comment 9 Vlad Brezae 2017-10-04 22:06:32 UTC
Adding a note that on x86 linux the ucontext doesn't contain information about xmm regs so we can't scan those registers.