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

Assertion 'jerry_value_is_number(jexitcode)' failed in iotjs_process_exitcode #1507

Closed
renatahodovan opened this issue Feb 22, 2018 · 1 comment · Fixed by #1510
Closed
Labels

Comments

@renatahodovan
Copy link
Contributor

IoT.js version:
Checked revision: 5da8a00
Build command: tools/build.py --buildtype=debug --jerry-profile=es2015-subset
OS:
Ubuntu 17.10, x86_64
Test case:
var x = require("console");
process.exitCode = x.id_0; 
Backtrace:
iotjs/src/iotjs_binding_helper.c:145: Assertion 'jerry_value_is_number(jexitcode)' failed.

(gdb) bt
#0  iotjs_process_exitcode () at iotjs/src/iotjs_binding_helper.c:145
#1  0x000055555557133d in iotjs_start (env=0x5555558a54c0 <current_env>) at iotjs/src/iotjs.c:148
#2  0x000055555557161c in iotjs_entry (argc=2, argv=0x7fffffffdd48) at iotjs/src/iotjs.c:204
#3  0x0000555555570e1a in main (argc=2, argv=0x7fffffffdd48) at iotjs/src/platform/linux/iotjs_linux.c:19

Found by Fuzzinator with grammarinator

@galpeter galpeter added the bug label Feb 22, 2018
@galpeter
Copy link
Contributor

An even smaller test case:

process.exitCode = undefined;

irishair7 added a commit to irishair7/iotjs that referenced this issue Feb 23, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
when it's not a number type, just let iotjs_process_exitcode() returns default number.

fixes jerryscript-project#1507

IoT.js-DCO-1.0-Signed-off-by: Minsoo Kim [email protected]
irishair7 added a commit to irishair7/iotjs that referenced this issue Feb 26, 2018
process.exitCode can be overwritten by anything.
when it's not a number type, just let iotjs_process_exitcode() returns default number.

fixes jerryscript-project#1507

IoT.js-DCO-1.0-Signed-off-by: Minsoo Kim [email protected]
irishair7 added a commit to irishair7/iotjs that referenced this issue Feb 26, 2018
process.exitCode can be overwritten by anything.
when it's not a number type, just let iotjs_process_exitcode() returns default number.

fixes jerryscript-project#1507

IoT.js-DCO-1.0-Signed-off-by: Minsoo Kim [email protected]
irishair7 added a commit to irishair7/iotjs that referenced this issue Feb 28, 2018
process.exitCode can be overwritten by anything.
when it's not a number type, convert it to number type using toNumber operation.(node.js compatible)

fixes jerryscript-project#1507

IoT.js-DCO-1.0-Signed-off-by: Minsoo Kim [email protected]
irishair7 added a commit to irishair7/iotjs that referenced this issue Feb 28, 2018
process.exitCode can be overwritten by anything.
when it's not a number type, convert it to number type using toNumber operation.(node.js compatible)

fixes jerryscript-project#1507

IoT.js-DCO-1.0-Signed-off-by: Minsoo Kim [email protected]
irishair7 added a commit to irishair7/iotjs that referenced this issue Mar 2, 2018
process.exitCode can be overwritten by anything.
when it's not a number type, convert it to number type using toNumber operation.(node.js compatible)

fixes jerryscript-project#1507

IoT.js-DCO-1.0-Signed-off-by: Minsoo Kim [email protected]
irishair7 added a commit to irishair7/iotjs that referenced this issue Mar 2, 2018
process.exitCode can be overwritten by anything.
when it's not a number type, convert it to number type using toNumber operation.(node.js compatible)

fixes jerryscript-project#1507

IoT.js-DCO-1.0-Signed-off-by: Minsoo Kim [email protected]
yichoi pushed a commit that referenced this issue Mar 5, 2018
process.exitCode can be overwritten by anything.
when it's not a number type, convert it to number type using toNumber operation.(node.js compatible)

fixes #1507

IoT.js-DCO-1.0-Signed-off-by: Minsoo Kim [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants