-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
dotnet/coreclr
#6522Description
With this change, dotnet/coreclr#6467 two GC pointers to could be potentially returned in X0 and X1. However, the VM helpers for this case do not exist, so we lose the GC pointer in X1, if any. This will cause a GC hole.
During return address hijacking, in HandledJitcase(), we'll currently hit the RET_Object case, https://github.com/dotnet/coreclr/blob/master/src/vm/threadsuspend.cpp#L7896
and take the OnHijackObjectTripThread() assembly routine, which only saves X0:
https://github.com/dotnet/coreclr/blob/master/src/vm/arm64/asmhelpers.asm#L886
We need an ARM64 version of OnHijackStructInRegsTripThread:
https://github.com/dotnet/coreclr/blob/master/src/vm/amd64/unixasmhelpers.S#L218
that correctly handles the GC pointers in X0 and/or X1.