mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* compile.c (defined_expr): protect some expression from
segmentation fault. a patch from wanabe <s.wanabe at gmail.com> in [ruby-dev:34593]. * compile.c (defined_expr): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0fb8126bbf
commit
58967f4fcd
2 changed files with 12 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Mon May 5 19:58:44 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* compile.c (defined_expr): protect some expression from
|
||||
segmentation fault. a patch from wanabe <s.wanabe at gmail.com>
|
||||
in [ruby-dev:34593].
|
||||
|
||||
Mon May 5 19:57:42 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* compile.c (defined_expr):
|
||||
|
||||
Mon May 5 19:49:59 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* struct.c (rb_struct_s_def): Struct.new(0) should not SEGV.
|
||||
|
|
|
@ -2464,6 +2464,7 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret,
|
|||
needstr);
|
||||
return 1;
|
||||
|
||||
case NODE_SUPER:
|
||||
case NODE_ZSUPER:
|
||||
ADD_INSN(ret, nd_line(node), putnil);
|
||||
ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_ZSUPER), 0,
|
||||
|
@ -2507,7 +2508,7 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret,
|
|||
}
|
||||
ADD_LABEL(ret, lend);
|
||||
|
||||
ADD_CATCH_ENTRY(CATCH_TYPE_ENSURE, lstart, lend, ensure, lfinish[1]);
|
||||
ADD_CATCH_ENTRY(CATCH_TYPE_RESCUE, lstart, lend, ensure, lfinish[1]);
|
||||
return 1;
|
||||
} /* end of default */
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue