Permalink
Browse files

Fix segfault in gen_values with NOVAL and more than 127 args

  • Loading branch information...
bouk committed Nov 15, 2016
1 parent c85feae commit 1264219832aeff2630f47d4abb9bee6d013c3e75
Showing with 8 additions and 2 deletions.
  1. +0 −2 mrbgems/mruby-compiler/core/codegen.c
  2. +8 −0 test/t/codegen.rb
@@ -818,8 +818,6 @@ gen_values(codegen_scope *s, node *t, int val)
}
}
else {
codegen(s, t->car->cdr, NOVAL);
t = t->cdr;
while (t) {
codegen(s, t->car, NOVAL);
t = t->cdr;
View
@@ -73,3 +73,11 @@ def args_to_ary(*args)
a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a
end
end
assert('next in normal loop with 127 arguments') do
assert_raise NameError do
while true
next A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A
end
end
end

0 comments on commit 1264219

Please sign in to comment.