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

Missing cases in jswCallFunctionHack #2328

Open
notEvil opened this issue Feb 13, 2023 · 0 comments
Open

Missing cases in jswCallFunctionHack #2328

notEvil opened this issue Feb 13, 2023 · 0 comments

Comments

@notEvil
Copy link

notEvil commented Feb 13, 2023

Hi,

test_typed_array_sort.js fails in Linux 32bit build with

ASSERT(jsvGetLocks(var) < 15) FAILED AT src/jsvar.c:800
  #1[r1,l2] Object { 
    #2[r1,l2] ASSERT(jsvGetLocks(var) < 15) FAILED AT src/jsvar.c:780
EXITING.

because jswCallFunctionHack in gen/jswrapper.c doesn't handle the call signatures of _jswrap_arraybufferview_sort_float and _jswrap_arraybufferview_sort_int (jspeFunctionCall in _jswrap_array_sort_compare returns null pointer from which a float is forcefully extracted). With

/*JSON{
  "type" : "",
  "generate" : "",
  "params" : [
    ["a", "float", ""],
    ["b", "float", ""]
  ],
  "return" : ["float", ""]
}*/
/*JSON{
  "type" : "",
  "generate" : "",
  "params" : [
    ["a", "int", ""],
    ["b", "int", ""]
  ],
  "return" : ["int", ""]
}*/

the test succeeds.

@notEvil notEvil mentioned this issue Feb 13, 2023
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

No branches or pull requests

1 participant