Skip to content

Jitter GC byref lifetime tracking missing a register #5505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
janvorli opened this issue Apr 6, 2016 · 0 comments
Closed

Jitter GC byref lifetime tracking missing a register #5505

janvorli opened this issue Apr 6, 2016 · 0 comments
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-release bug
Milestone

Comments

@janvorli
Copy link
Member

janvorli commented Apr 6, 2016

The jitter misses tracking lifetime of the R15 register when jitting Microsoft.AspNetCore.Server.Kestrel.Http.SocketOutput:ProducingStart method, which leads to a GC hole. Here is a dump of the fragment of the jitted code with the lifetime annotation where it is visible that the R15 is not tracked and so if GC happens between the R15 assignment and the last instruction in the list below and the object pointed to by the initial RBX gets moved, the R15 is no longer valid.

New byrReg live regs=00000000 {}
byrReg -[rsi]
gcrReg +[rsi]
IN0010: 00005F 488BF7               mov      rsi, rdi
IN0011: 000062 448B772C             mov      r14d, dword ptr [rdi+44]
gcrReg -[rbx]
byrReg +[rbx]
IN0012: 000066 4881C388000000       add      rbx, 136
IN0013: 00006D 4C8BFB               mov      r15, rbx
gcrReg -[rdi]
byrReg +[rdi]
IN0014: 000070 498BFF               mov      rdi, r15
New gcrReg live regs=00000000 {}
gcrReg -[rsi]
New byrReg live regs=00000008 {rbx}
byrReg -[rdi]
IN0015: 000073 FF1500000000         call     [CORINFO_HELP_CHECKED_ASSIGN_REF]
IN0016: 000079 45897708             mov      dword ptr [r15+8], r14d
@msftgits msftgits transferred this issue from dotnet/coreclr Jan 30, 2020
@msftgits msftgits added this to the 1.0.0-rc2 milestone Jan 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-release bug
Projects
None yet
Development

No branches or pull requests

4 participants