-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Adjust relative offsets in UMThunkStub #4888
Conversation
This commit updates the relative offsets inside UMThunkStub according to the recent changes in UMThunkStub (for stack unwinding).
@@ -441,7 +444,7 @@ LOCAL_LABEL(UMThunkStub_WrongAppDomain): | |||
ldr r2, [r3, #UMThunkMarshInfo__m_cbActualArgSize] | |||
cbz r2, LOCAL_LABEL(UM2MThunk_WrapperHelper_ArgumentsSetup) | |||
|
|||
add r0, r5, #UMThunkStub_StackArgs // Source pointer | |||
add r0, r5, #UMThunkStub_StackArgsOffset // Source pointer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is strange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I have no idea on this line. I considered add r0, r5, #UMThunkStub_StackArgsSize
, and add r0, r5, #UMThunkStub_StackArgsOffset
.
Could you let me know your opinion? I would be very helpful if there is any information on how UM2MThunk_WrapperHelper
works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because, UM2MThunk_WrapperHelper
is another function, it is NOT affected by the r7
value of UMThunkStub
. There is no reason for the argument of UM2MThunk_WrapperHelper
, r0
, be altered by the correction of r7
in UMThunkStub
.
Thus, the value for this line should be kept unchanged (UMThunkStub_StackArgsSize
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just suspected that UM2MThunk_WrapperHelper
may take the value r7
as its first argument, but I find no such code until now.
I'll change that line as you suggested.
…set' This commit revises 'UM2MThunk_WrapperHelper' to use 'UMThunkStub_StackArgsSize' instead of 'UMThunkStub_StackArgsOffset'.
LGTM |
* Adjust relative offsets in UMThunkStub This commit updates the relative offsets inside UMThunkStub according to the recent changes in UMThunkStub (for stack unwinding). * Uses 'UMThunkStub_StackArgsSize' instead of 'UMThunkStub_StackArgsOffset' This commit revises 'UM2MThunk_WrapperHelper' to use 'UMThunkStub_StackArgsSize' instead of 'UMThunkStub_StackArgsOffset'. Commit migrated from dotnet/coreclr@7fe0fef
This commit updates the relative offsets inside UMThunkStub according to the recent changes in
UMThunkStub (for stack unwinding).
This commit fixes #4885.