mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
care about TAG_FATAL.
TAG_FATAL represents interpreter closing state and ec->errinfo contains FIXNUM (eTerminateSignal, etc). If we need to change the state, then errinfo is also changed because TAG_RAISE assumes that ec->errinfo contains a Exception object. Without this patch, TAG_FATAL is ignored and no ec->errinfo change so that it causes critical issue. [Bug #16177]
This commit is contained in:
parent
c53aec73dd
commit
a5fe08fdd9
1 changed files with 4 additions and 1 deletions
5
load.c
5
load.c
|
@ -1034,7 +1034,10 @@ require_internal(rb_execution_context_t *ec, VALUE fname, int exception)
|
|||
if (ftptr) load_unlock(RSTRING_PTR(path), !state);
|
||||
|
||||
if (state) {
|
||||
if (exception) {
|
||||
if (state == TAG_FATAL) {
|
||||
EC_JUMP_TAG(ec, state);
|
||||
}
|
||||
else if (exception) {
|
||||
/* usually state == TAG_RAISE only, except for
|
||||
* rb_iseq_load_iseq in load_iseq_eval case */
|
||||
VALUE exc = rb_vm_make_jump_tag_but_local_jump(state, Qundef);
|
||||
|
|
Loading…
Reference in a new issue