Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GR-53444] Typo in error message "java.lang.AssertionError: Expected number of params 2, actual 2" #8765

Closed
illarionov opened this issue Apr 13, 2024 · 2 comments
Assignees
Labels

Comments

@illarionov
Copy link

Describe the issue

When executing a WASM function passing an incorrect number of arguments, the assertion is triggered with the following error message:

java.lang.AssertionError: Expected number of params 2, actual 2
org.graalvm.polyglot.PolyglotException: java.lang.AssertionError: Expected number of params 2, actual 2
	at org.graalvm.wasm.nodes.WasmRootNode.moveArgumentsToLocals(WasmRootNode.java:243)
	at org.graalvm.wasm.nodes.WasmRootNode.executeWithContext(WasmRootNode.java:160)
	at org.graalvm.wasm.nodes.WasmRootNode.execute(WasmRootNode.java:144)
	at <wasm> sqlite3__wasm_config_i(Unknown)
	at org.graalvm.polyglot.Value.execute(Value.java:930)

The "actual" number of arguments in this message should be 1 and not 2.

This is a typo on the line

assert WasmArguments.getArgumentCount(args) == paramCount : "Expected number of params " + paramCount + ", actual " + args.length;
(args.length should be replaced with WasmArguments.getArgumentCount(args)).

Describe GraalVM and your environment:

  • GraalVM version 24.0.0
  • JDK major version: 21
  • OS: Linux
  • Architecture: AMD64
@illarionov illarionov added the bug label Apr 13, 2024
@selhagani selhagani self-assigned this Apr 15, 2024
@selhagani
Copy link
Member

Hi @illarionov, thank you for sharing this with us.

I will share this with our dev team and we'll keep you updated.

@selhagani selhagani assigned teshull and unassigned selhagani Apr 15, 2024
@selhagani selhagani changed the title Typo in error message "java.lang.AssertionError: Expected number of params 2, actual 2" [GR-53444] Typo in error message "java.lang.AssertionError: Expected number of params 2, actual 2" Apr 15, 2024
@wirthi wirthi assigned woess and unassigned teshull Apr 15, 2024
@illarionov
Copy link
Author

I see that the merge was done in b134d48 and this issue can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants