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_string(jval)' failed in iotjs_jval_as_string

renatahodovan opened this issue · comments

IoT.js version:
Checked revision: e3cd187
Build command: tools/build.py --buildtype debug --jerry-profile=es2015-subset --experimental
OS:
Ubuntu 17.10, x86_64
Test case:
process.compileModule(Uint32Array, Uint8Array)
Backtrace:
iotjs/src/iotjs_binding.c:89: Assertion 'jerry_value_is_string(jval)' failed.

Breakpoint 1, iotjs_jval_as_string (jval=72) at iotjs/src/iotjs_binding.c:89
89	  IOTJS_ASSERT(jerry_value_is_string(jval));
(gdb) bt
#0  iotjs_jval_as_string (jval=72) at iotjs/src/iotjs_binding.c:89
#1  0x5659b824 in CompileModule (jfunc=4124051971, jthis=4126148403, jargv=0xffffb75c, jargc=2)
    at iotjs/src/modules/iotjs_module_process.c:113
#2  0x5664df15 in ecma_op_function_call (func_obj_p=0xf5d00a00, this_arg_value=4126148403, arguments_list_p=0xffffb75c, 
    arguments_list_len=2) at iotjs/deps/jerry/jerry-core/ecma/operations/ecma-function-object.c:466
#3  0x566c07b9 in opfunc_call (frame_ctx_p=0xffffb7d0) at iotjs/deps/jerry/jerry-core/vm/vm.c:417
#4  0x566d0192 in vm_execute (frame_ctx_p=0xffffb7d0, arg_p=0xffffbd4c, arg_list_len=3)
    at iotjs/deps/jerry/jerry-core/vm/vm.c:2844
#5  0x566d0979 in vm_run (bytecode_header_p=0xf5500410, this_binding_value=4126165523, lex_env_p=0xf5f00790, is_eval_code=false, 
    arg_list_p=0xffffbd4c, arg_list_len=3) at iotjs/deps/jerry/jerry-core/vm/vm.c:2924
#6  0x5664d88d in ecma_op_function_call (func_obj_p=0xf5d06a90, this_arg_value=4126165523, arguments_list_p=0xffffbd4c, 
    arguments_list_len=3) at iotjs/deps/jerry/jerry-core/ecma/operations/ecma-function-object.c:405
#7  0x565fc0cd in ecma_builtin_function_prototype_object_call (this_arg=4124076691, arguments_list_p=0xffffbd48, arguments_number=4)
    at iotjs/deps/jerry/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c:215
#8  0x565fb5b4 in ecma_builtin_function_prototype_dispatch_routine (builtin_routine_id=60, this_arg_value=4124076691, 
    arguments_list=0xffffbd48, arguments_number=4)
    at iotjs/deps/jerry/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.inc.h:42
#9  0x5663b493 in ecma_builtin_dispatch_routine (builtin_object_id=ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, builtin_routine_id=60, 
    this_arg_value=4124076691, arguments_list_p=0xffffbd48, arguments_list_len=4)
    at iotjs/deps/jerry/jerry-core/ecma/builtin-objects/ecma-builtins.c:880
#10 0x5663b6bf in ecma_builtin_dispatch_call (obj_p=0xf5d038e0, this_arg_value=4124076691, arguments_list_p=0xffffbd48, 
    arguments_list_len=4) at iotjs/deps/jerry/jerry-core/ecma/builtin-objects/ecma-builtins.c:905
#11 0x5664d4ef in ecma_op_function_call (func_obj_p=0xf5d038e0, this_arg_value=4124076691, arguments_list_p=0xffffbd48, 
    arguments_list_len=4) at iotjs/deps/jerry/jerry-core/ecma/operations/ecma-function-object.c:342
#12 0x566c07b9 in opfunc_call (frame_ctx_p=0xffffbdd0) at iotjs/deps/jerry/jerry-core/vm/vm.c:417
#13 0x566d0192 in vm_execute (frame_ctx_p=0xffffbdd0, arg_p=0xffffc128, arg_list_len=2)
    at iotjs/deps/jerry/jerry-core/vm/vm.c:2844
#14 0x566d0979 in vm_run (bytecode_header_p=0xf63035c0, this_binding_value=4126165555, lex_env_p=0xf5f02810, is_eval_code=false, 
    arg_list_p=0xffffc128, arg_list_len=2) at iotjs/deps/jerry/jerry-core/vm/vm.c:2924
#15 0x5664d88d in ecma_op_function_call (func_obj_p=0xf5d05f50, this_arg_value=4126165555, arguments_list_p=0xffffc128, 
    arguments_list_len=2) at iotjs/deps/jerry/jerry-core/ecma/operations/ecma-function-object.c:405
#16 0x566c07b9 in opfunc_call (frame_ctx_p=0xffffc1b0) at iotjs/deps/jerry/jerry-core/vm/vm.c:417
#17 0x566d0192 in vm_execute (frame_ctx_p=0xffffc1b0, arg_p=0xffffc4f4, arg_list_len=2)
    at iotjs/deps/jerry/jerry-core/vm/vm.c:2844
#18 0x566d0979 in vm_run (bytecode_header_p=0xf4903ac0, this_binding_value=4124061427, lex_env_p=0xf5f02810, is_eval_code=false, 
    arg_list_p=0xffffc4f4, arg_list_len=2) at iotjs/deps/jerry/jerry-core/vm/vm.c:2924
#19 0x5664d88d in ecma_op_function_call (func_obj_p=0xf5d06010, this_arg_value=4124061427, arguments_list_p=0xffffc4f4, 
    arguments_list_len=2) at iotjs/deps/jerry/jerry-core/ecma/operations/ecma-function-object.c:405
#20 0x566c07b9 in opfunc_call (frame_ctx_p=0xffffc560) at iotjs/deps/jerry/jerry-core/vm/vm.c:417
#21 0x566d0192 in vm_execute (frame_ctx_p=0xffffc560, arg_p=0xffffc8c4, arg_list_len=0)
    at iotjs/deps/jerry/jerry-core/vm/vm.c:2844
#22 0x566d0979 in vm_run (bytecode_header_p=0xf5908a40, this_binding_value=4124061427, lex_env_p=0xf5f02810, is_eval_code=false, 
    arg_list_p=0xffffc8c4, arg_list_len=0) at iotjs/deps/jerry/jerry-core/vm/vm.c:2924
#23 0x5664d88d in ecma_op_function_call (func_obj_p=0xf5d05f20, this_arg_value=4124061427, arguments_list_p=0xffffc8c4, 
    arguments_list_len=0) at iotjs/deps/jerry/jerry-core/ecma/operations/ecma-function-object.c:405
#24 0x566c07b9 in opfunc_call (frame_ctx_p=0xffffc940) at iotjs/deps/jerry/jerry-core/vm/vm.c:417
#25 0x566d0192 in vm_execute (frame_ctx_p=0xffffc940, arg_p=0xffffcc74, arg_list_len=0)
    at iotjs/deps/jerry/jerry-core/vm/vm.c:2844
#26 0x566d0979 in vm_run (bytecode_header_p=0xf4f03e40, this_binding_value=4124052307, lex_env_p=0xf5f00d30, is_eval_code=false, 
    arg_list_p=0xffffcc74, arg_list_len=0) at iotjs/deps/jerry/jerry-core/vm/vm.c:2924
#27 0x5664d88d in ecma_op_function_call (func_obj_p=0xf5d01630, this_arg_value=72, arguments_list_p=0xffffcc74, arguments_list_len=0)
    at iotjs/deps/jerry/jerry-core/ecma/operations/ecma-function-object.c:405
#28 0x566c07b9 in opfunc_call (frame_ctx_p=0xffffcce0) at iotjs/deps/jerry/jerry-core/vm/vm.c:417
#29 0x566d0192 in vm_execute (frame_ctx_p=0xffffcce0, arg_p=0x0, arg_list_len=0)
    at iotjs/deps/jerry/jerry-core/vm/vm.c:2844
#30 0x566d0979 in vm_run (bytecode_header_p=0xf5d01690, this_binding_value=4124052307, lex_env_p=0xf5f00790, is_eval_code=false, 
    arg_list_p=0x0, arg_list_len=0) at iotjs/deps/jerry/jerry-core/vm/vm.c:2924
#31 0x566bf922 in vm_run_global (bytecode_p=0xf5d01690) at iotjs/deps/jerry/jerry-core/vm/vm.c:224
#32 0x565a3a04 in jerry_run (func_val=4124055139) at iotjs/deps/jerry/jerry-core/api/jerry.c:565
#33 0x56584c8f in iotjs_jhelper_eval (name=0x5670fba0 "iotjs.js", name_len=8, 
    data=0x5671f180 <iotjs_s> "/* Copyright 2015-present Samsung Electronics Co., Ltd. and other contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance w"..., size=4355, strict_mode=false)
    at iotjs/src/iotjs_binding.c:273
#34 0x56582a60 in iotjs_run (env=0x567a6400 <current_env>) at iotjs/src/iotjs.c:99
#35 0x56582b45 in iotjs_start (env=0x567a6400 <current_env>) at iotjs/src/iotjs.c:132
#36 0x565834fd in iotjs_entry (argc=2, argv=0xffffd024) at iotjs/src/iotjs.c:207
#37 0x56581ff5 in main (argc=2, argv=0xffffd024) at iotjs/src/platform/linux/iotjs_linux.c:19

Found by Fuzzinator