Actions
Bug #7635
closeddebug_inspector API segfaults when opened from inside an eval frame
Description
=begin
(({rb_debug_inspector_open})) segfaults when it is called from inside an eval frame.
Using this C extension:
#include "ruby/ruby.h"
static VALUE
cb()
{
return Qnil;
}
static VALUE
debug_inspector()
{
return rb_debug_inspector_open(cb, NULL);
}
void
Init_debug_inspector()
{
rb_define_global_function("debug_inspector", debug_inspector, 0);
}
Calling (({debug_inspector})) from the top level and from within methods works fine, calling inside eval from the top level works fine, but calling inside eval from within a method segfaults.
Here is a test program that segfaults:
require "./debug_inspector" # the c extension above
def x
eval "debug_inspector"
end
x
=end
Actions
Like0
Like0Like0