Skip to content

Fix dropping of arguments in JS library functions#21062

Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:avoid_dropping_args
Jan 11, 2024
Merged

Fix dropping of arguments in JS library functions#21062
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:avoid_dropping_args

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jan 10, 2024

When the __sig for a function is shorter than the actual number of argument (i.e. when the native signature is shorter than the JS signature) we were dropping the extra arguments in handleI64Signatures.

Specifically the uuid_unparse library function has a hidden third argument that is not exposed to native code (doesn't appear in the native signature).

Fixes: #21056

@sbc100 sbc100 requested a review from kripken January 10, 2024 23:02
@sbc100 sbc100 force-pushed the avoid_dropping_args branch 3 times, most recently from 91cd515 to f90e0e1 Compare January 10, 2024 23:25
@sbc100 sbc100 enabled auto-merge (squash) January 10, 2024 23:45
@kripken kripken disabled auto-merge January 11, 2024 00:20
When the `__sig` for a function is shorter than the actual number of
argument (i.e. when the native signature is shorter than the JS
signature) we were dropping the extra arguments in handleI64Signatures.

Specifically the `uuid_unparse` library function has a hidden third
argument that is not exposed to native code (doesn't appear in the
native signature).

Fixes: emscripten-core#21056
@sbc100 sbc100 force-pushed the avoid_dropping_args branch from f90e0e1 to dfdeb79 Compare January 11, 2024 00:23
@sbc100 sbc100 merged commit 7f84b88 into emscripten-core:main Jan 11, 2024
@sbc100 sbc100 deleted the avoid_dropping_args branch January 11, 2024 00:24
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.

Uncaught ReferenceError: upper is not defined, uuid_unparse

2 participants