Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Adjust relative offsets in UMThunkStub #4888

Merged
merged 2 commits into from
May 10, 2016
Merged

Conversation

parjong
Copy link

@parjong parjong commented May 10, 2016

This commit updates the relative offsets inside UMThunkStub according to the recent changes in
UMThunkStub (for stack unwinding).

This commit fixes #4885.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is strange.

Copy link
Author

@parjong parjong May 10, 2016

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.

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)

Copy link
Author

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'.
@janvorli
Copy link
Member

LGTM

@janvorli janvorli merged commit 7fe0fef into dotnet:master May 10, 2016
@parjong parjong deleted the fix/issue_4885 branch May 10, 2016 22:38
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ARM/Linux] Regressions.common.ToLower.ToLower fails
5 participants