jerryscript-project / iotjs

Platform for Internet of Things with JavaScript http://www.iotjs.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion 'jerry_value_is_number(jexitcode)' failed in iotjs_process_exitcode

renatahodovan opened this issue · comments

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

An even smaller test case:

process.exitCode = undefined;