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

terminate called after throwing an instance of 'Escargot::Value' #36

Closed
renatahodovan opened this issue Jan 2, 2019 · 0 comments
Closed

Comments

@renatahodovan
Copy link
Member

Escargot version:
Checked revision: 8f6925a

Build command: cmake -H. -Bout -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=debug -DESCARGOT_OUTPUT=bin -GNinja && ninja -Cout
OS:
Linux-4.15.0-38-generic-x86_64-with-Ubuntu-18.04-bionic
Test case:
Error.prototype.toString = Object.getOwnPropertyDescriptor.toString;
throw ReferenceError("x");
Backtrace:
terminate called after throwing an instance of 'Escargot::Value'

bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff688d801 in __GI_abort () at abort.c:79
#2  0x00007ffff72808b7 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff7286a06 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7286a41 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7286c74 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00005555557a3289 in Escargot::SandBox::throwException (this=0x7fffffffdd00, state=..., exception=...) at ../src/runtime/SandBox.cpp:65
#7  0x00005555555fa7b0 in Escargot::ByteCodeInterpreter::processException (state=..., value=..., ecInput=0x7fffffffd970, programCounter=18446744073709551615) at ../src/interpreter/ByteCodeInterpreter.cpp:2183
#8  0x00005555556ccb51 in Escargot::FunctionObject::processCall (this=0x7ffff486a6a0, state=..., receiverSrc=..., argc=@0x7fffffffda80: 0, argv=0x0, isNewExpression=false) at ../src/runtime/FunctionObject.cpp:328
#9  0x00005555555c5313 in Escargot::FunctionObject::call (this=0x7ffff486a6a0, state=..., receiver=..., argc=@0x7fffffffda80: 0, argv=0x0) at escargot//src/runtime/FunctionObject.h:92
#10 0x00005555557be469 in Escargot::Value::ordinaryToPrimitive (this=0x7fffffffdd68, state=..., preferredType=Escargot::Value::PreferString) at ../src/runtime/Value.cpp:147
#11 0x00005555557bea0d in Escargot::Value::toPrimitiveSlowCase (this=0x7fffffffdd68, state=..., preferredType=Escargot::Value::PreferString) at ../src/runtime/Value.cpp:213
#12 0x00005555555ee015 in Escargot::Value::toPrimitive (this=0x7fffffffdd68, ec=..., preferredType=Escargot::Value::PreferString) at escargot//src/runtime/ValueInlines.h:683
#13 0x00005555557be0d8 in Escargot::Value::toStringSlowCase (this=0x7fffffffdd68, ec=...) at ../src/runtime/Value.cpp:115
#14 0x00005555555c199c in Escargot::Value::toString (this=0x7fffffffdd68, ec=...) at escargot//src/runtime/Value.h:182
#15 0x00005555557a2fbc in Escargot::SandBox::run(std::function<Escargot::Value ()> const&) (this=0x7fffffffdd00, scriptRunner=...) at ../src/runtime/SandBox.cpp:40
#16 0x0000555555611f10 in Escargot::Script::sandboxExecute (this=0x7ffff47e4070, state=...) at ../src/parser/Script.cpp:94
#17 0x00005555557c12f9 in eval (context=0x7ffff486bed0, str=0x7ffff47e9750, fileName=0x7ffff47e96b0, shouldPrintScriptResult=false) at ../src/shell/Shell.cpp:46
#18 0x00005555557c1c48 in main (argc=2, argv=0x7fffffffe0b8) at ../src/shell/Shell.cpp:129

Found by Fuzzinator with grammarinator.

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