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

Event Command Execution Status casted to invalid JS type (possibly) #60

Open
zackpudil opened this issue Mar 10, 2018 · 1 comment
Open

Comments

@zackpudil
Copy link

zackpudil commented Mar 10, 2018

In src/event.cpp:68:

case CL_EVENT_COMMAND_EXECUTION_STATUS:
{
  cl_int val;
  CHECK_ERR(::clGetEventInfo(ev->getRaw(),param_name,sizeof(cl_int), &val, NULL))
  info.GetReturnValue().Set(JS_INT(val)); // <---- this line right heer should use JS_NUM?
}

the return value of the event execution status is casted to an unsigned int. Shouldn't that use the JS_NUM cast since it's possible to return negative values for errors?

Currently if the CL_EVENT_COMMAND_EXECUTION_STATUS is an error (negative number) the returned status is some big number (e.g 4294967291) because two's compliment being ignored due to unsigned int case. 4294967291 should display as -5.

@mikeseven
Copy link
Owner

mikeseven commented Mar 10, 2018 via email

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

2 participants