Skip to content

[jit] Return the compiled method and an unbox trampoline from ldvirtftn when calling ldvirtftn on a valuetype method.#19809

Merged
vargaz merged 7 commits intomono:masterfrom
vargaz:delegate-unbox
May 23, 2020
Merged

[jit] Return the compiled method and an unbox trampoline from ldvirtftn when calling ldvirtftn on a valuetype method.#19809
vargaz merged 7 commits intomono:masterfrom
vargaz:delegate-unbox

Conversation

@vargaz
Copy link
Contributor

@vargaz vargaz commented May 20, 2020

@fanyang-mono
Copy link
Contributor

Two coreclr tests related to this issue need to be enabled as well.
Please refer to my change to src/coreclr/tests/issues.targets here
https://github.com/dotnet/runtime/pull/35766/files

vargaz added 3 commits May 20, 2020 15:24
Also handle unbox trampolines during the addr->method lookup.

* Merge mono_delegate_ctor () and mono_delegate_ctor_with_method ().
* Move the actual logic to mini_init_delegate ().
* Remove callbacks.create_jump_trampoline, its not used any more.
@vargaz vargaz force-pushed the delegate-unbox branch 2 times, most recently from 8ffd067 to 4159355 Compare May 20, 2020 22:58
@vargaz
Copy link
Contributor Author

vargaz commented May 21, 2020

@monojenkins build failed

@vargaz
Copy link
Contributor Author

vargaz commented May 21, 2020

This seems to work now.

@vargaz vargaz marked this pull request as ready for review May 21, 2020 07:13
@vargaz vargaz requested review from BrzVlad and thaystg as code owners May 21, 2020 07:13
@vargaz
Copy link
Contributor Author

vargaz commented May 21, 2020

To recap, the problem with the previous patch was that mono_delegate_ctor () would need to do an address->method reverse lookup, and it couldn't do it because address was pointing to an unbox trampoline, which was not registered in the JIT info tables.

@SamMonoRT
Copy link
Contributor

You need to somehow port this to dotnet\runtime and update the issues.target file to run these changes and tests enabled and make sure those pass.

@vargaz
Copy link
Contributor Author

vargaz commented May 21, 2020

@monojenkins build failed

@vargaz
Copy link
Contributor Author

vargaz commented May 22, 2020

@monojenkins build failed

@vargaz
Copy link
Contributor Author

vargaz commented May 22, 2020

@monojenkins build

@vargaz
Copy link
Contributor Author

vargaz commented May 23, 2020

@monojenkins build failed

@vargaz vargaz merged commit 8446996 into mono:master May 23, 2020
@vargaz vargaz deleted the delegate-unbox branch May 23, 2020 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CoreCLR tests on Mono runtime : crash running JIT/Methodical/VT/callconv/_il_dbgjumps4/_il_dbgjumps4.sh

4 participants