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

RELEASE_ASSERT_NOT_REACHED in Escargot::Node::generateStatementByteCode #35

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

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:
for ( // ; ; ) { 
} 

 
Backtrace:
RELEASE_ASSERT_NOT_REACHED at ../src/parser/ast/Node.h (251)

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  0x0000555555615e16 in Escargot::Node::generateStatementByteCode (this=0x7ffff7e3ced0, codeBlock=0x7ffff487a730, context=0x7fffffffd260) at ../src/parser/ast/Node.h:251
#3  0x000055555562f61c in Escargot::ForStatementNode::generateStatementByteCode (this=0x7ffff47eef70, codeBlock=0x7ffff487a730, context=0x7fffffffd820) at escargot//src/parser/ast/ForStatementNode.h:52
#4  0x000055555561f32c in Escargot::StatementContainer::generateStatementByteCode (this=0x555555bac590, codeBlock=0x7ffff487a730, context=0x7fffffffd820) at escargot//src/parser/ast/StatementNode.h:75
#5  0x0000555555632079 in Escargot::ProgramNode::generateStatementByteCode (this=0x7ffff47eff90, codeBlock=0x7ffff487a730, context=0x7fffffffd820) at escargot//src/parser/ast/ProgramNode.h:48
#6  0x00005555555e1715 in Escargot::ByteCodeGenerator::generateByteCode (this=0x7fffffffda77, c=0x7ffff486bed0, codeBlock=0x7ffff47f0ed0, ast=0x7ffff47eff90, scopeCtx=0x7ffff487a850, isEvalMode=false, isOnGlobal=true, shouldGenerateLOCData=false) at ../src/interpreter/ByteCodeGenerator.cpp:188
#7  0x00005555556118f5 in Escargot::Script::execute (this=0x7ffff47e42b0, state=..., isEvalMode=false, needNewEnv=false, isOnGlobal=true) at ../src/parser/Script.cpp:46
#8  0x0000555555611e33 in Escargot::Script::<lambda()>::operator()(void) const (__closure=0x7fffffffdd90) at ../src/parser/Script.cpp:93
#9  0x0000555555612ed6 in std::_Function_handler<Escargot::Value(), Escargot::Script::sandboxExecute(Escargot::ExecutionState&)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/7/bits/std_function.h:302
#10 0x00005555557a43e4 in std::function<Escargot::Value ()>::operator()() const (this=0x7fffffffdd90) at /usr/include/c++/7/bits/std_function.h:706
#11 0x00005555557a2f29 in Escargot::SandBox::run(std::function<Escargot::Value ()> const&) (this=0x7fffffffdd00, scriptRunner=...) at ../src/runtime/SandBox.cpp:36
#12 0x0000555555611f10 in Escargot::Script::sandboxExecute (this=0x7ffff47e42b0, state=...) at ../src/parser/Script.cpp:94
#13 0x00005555557c12f9 in eval (context=0x7ffff486bed0, str=0x7ffff47e9750, fileName=0x7ffff47e96b0, shouldPrintScriptResult=false) at ../src/shell/Shell.cpp:46
#14 0x00005555557c1c48 in main (argc=2, argv=0x7fffffffe0b8) at ../src/shell/Shell.cpp:129

Found by Fuzzinator with grammarinator.

robertsipka added a commit to robertsipka/escargot that referenced this issue Jan 22, 2019
robertsipka added a commit to robertsipka/escargot that referenced this issue Jan 22, 2019
robertsipka added a commit to robertsipka/escargot that referenced this issue Jan 22, 2019
robertsipka added a commit to robertsipka/escargot that referenced this issue Jan 22, 2019
robertsipka added a commit to robertsipka/escargot that referenced this issue Jan 23, 2019
robertsipka added a commit to robertsipka/escargot that referenced this issue Jan 23, 2019
yichoi pushed a commit that referenced this issue Jan 24, 2019
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