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

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


Attachments

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
https://github.com/mono/mono/pull/4166
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.

Note You need to log in before you can comment on or make changes to this bug.