Skip to content

Need Hijack Handlers for ARM64 StructInRegs  #6396

@swaroop-sridhar

Description

@swaroop-sridhar

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions