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

mruby-eval instance_eval segfaults on rescue #2483

Closed
IceDragon200 opened this issue Jul 21, 2014 · 0 comments
Closed

mruby-eval instance_eval segfaults on rescue #2483

IceDragon200 opened this issue Jul 21, 2014 · 0 comments

Comments

@IceDragon200
Copy link
Contributor

Current mruby head: 4cc9e5d
In the following code:

begin
  instance_eval("a")
rescue Exception
end

instance_eval will cause a mruby segfault with a rescue block.
Removing the rescue block will have the code work as expected.

This only occurs with the mruby-eval extension installed.

Example & Backtrace:

mirb - Embeddable Interactive Ruby Shell

> begin
* instance_eval("a")
* rescue Exception
* end

Program received signal SIGSEGV, Segmentation fault.
0x0000000000404aed in mrb_context_run (mrb=0x0, mrb@entry=0x6c2010, proc=0x2, proc@entry=0x70a4f0, self=..., stack_keep=7160192, stack_keep@entry=0)
    at /home/icy/docs/codes/archSeer/moon/vendor/mruby/src/vm.c:774
774       NEXT;
(gdb) backtrace
#0  0x0000000000404aed in mrb_context_run (mrb=0x0, mrb@entry=0x6c2010, proc=0x2, proc@entry=0x70a4f0, self=..., stack_keep=7160192, stack_keep@entry=0)
    at /home/icy/docs/codes/archSeer/moon/vendor/mruby/src/vm.c:774
#1  0x0000000000403b3d in main (argc=<optimized out>, argv=<optimized out>)
    at /home/icy/docs/codes/archSeer/moon/vendor/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c:414
(gdb) 
@matz matz closed this as completed in 7457da6 Jul 21, 2014
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