Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vargaz
Copy link
Contributor

@vargaz vargaz commented Aug 7, 2020

The attributes need to be ignored as with the other types, otherwise gsharedvt wrappers for signatures with
parameters like double f = default will not be found.

Fixes #20195.

…g generic sharing.

The attributes need to be ignored as with the other types, otherwise gsharedvt wrappers for signatures with
parameters like double f = default will not be found.

Fixes mono#20195.
@vargaz
Copy link
Contributor Author

vargaz commented Aug 7, 2020

@monojenkins build failed

@srxqds
Copy link

srxqds commented Aug 7, 2020

should the method get_wrapper_shared_type_reg consider this bug also?

static MonoType*
get_wrapper_shared_type (MonoType *t)
{
return get_wrapper_shared_type_full (t, FALSE);
}
/* Returns the intptr type for types that are passed in a single register */
static MonoType*
get_wrapper_shared_type_reg (MonoType *t, gboolean pinvoke)
{
MonoType *orig_t = t;
t = get_wrapper_shared_type (t);
if (t->byref)
return t;
switch (t->type) {
case MONO_TYPE_BOOLEAN:
case MONO_TYPE_CHAR:
case MONO_TYPE_I1:
case MONO_TYPE_U1:
case MONO_TYPE_I2:
case MONO_TYPE_U2:
case MONO_TYPE_I4:
case MONO_TYPE_U4:
case MONO_TYPE_I:
case MONO_TYPE_U:
#if TARGET_SIZEOF_VOID_P == 8

I found it also do't consider the r4/r8 type.

@vargaz
Copy link
Contributor Author

vargaz commented Aug 7, 2020

It calls the other function.

@srxqds
Copy link

srxqds commented Aug 7, 2020

but it is also not handling r4/r8 parameter types, it can't be a problem?

@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@mono mono deleted a comment from srxqds Aug 7, 2020
@akoeplinger
Copy link
Member

I deleted a bunch of duplicate comments (maybe a github bug?)

jeromelaban added a commit to unoplatform/Uno.Wasm.MonoRuntime that referenced this pull request Aug 7, 2020
@vargaz vargaz merged commit 9d9ec21 into mono:master Aug 10, 2020
@vargaz vargaz deleted the wasm-float-attrs branch August 10, 2020 12:30
@BrzVlad
Copy link
Member

BrzVlad commented Aug 17, 2022

/backport to 2020-02

@github-actions
Copy link
Contributor

Started backporting to 2020-02: https://github.com/mono/mono/actions/runs/2875839291

@github-actions
Copy link
Contributor

@BrzVlad backporting to 2020-02 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: [aot] Fix the handling of r4/r8 parameter types with attributes during generic sharing.
Using index info to reconstruct a base tree...
M	mono/mini/mini-generic-sharing.c
Falling back to patching base and 3-way merge...
Auto-merging mono/mini/mini-generic-sharing.c
CONFLICT (content): Merge conflict in mono/mini/mini-generic-sharing.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 [aot] Fix the handling of r4/r8 parameter types with attributes during generic sharing.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

BrzVlad pushed a commit to BrzVlad/mono that referenced this pull request Aug 17, 2022
…g generic sharing. (mono#20217)

The attributes need to be ignored as with the other types, otherwise gsharedvt wrappers for signatures with
parameters like double f = default will not be found.

Fixes mono#20195.
akoeplinger pushed a commit that referenced this pull request Aug 18, 2022
…#21537)

* [wasm] Fix the handling of i8/u8 in get_wrapper_shared_type_full (). (#19859)

Previously, these were returned verbatim, which caused sharing issues when the type had
attributes.

Fixes #19841.

* [aot] Fix the handling of r4/r8 parameter types with attributes during generic sharing. (#20217)

The attributes need to be ignored as with the other types, otherwise gsharedvt wrappers for signatures with
parameters like double f = default will not be found.

Fixes #20195.

Co-authored-by: Zoltan Varga <[email protected]>
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.

[Wasm] RuntimeError: function signature mismatch (RuntimeError: function signature mismatch)

5 participants