diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-12-19 14:10:58 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-12-20 14:12:38 +0900 |
commit | 2e7e153a2af1456515d43b6381e38534b069b1c2 (patch) | |
tree | a7c1730d6b86170e9e80f2e9705ea824ed517829 /eval.c | |
parent | 18ba89093a0b214cd89f1567c037c239f094496d (diff) |
[Bug #19242] Prohibit circular causes to be loaded
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6960
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -537,12 +537,16 @@ exc_setup_message(const rb_execution_context_t *ec, VALUE mesg, VALUE *cause) } if (!nocircular && !NIL_P(*cause) && !UNDEF_P(*cause) && *cause != mesg) { +#if 0 /* maybe critical for some cases */ + rb_exc_check_circular_cause(*cause); +#else VALUE c = *cause; while (!NIL_P(c = rb_attr_get(c, id_cause))) { if (c == mesg) { rb_raise(rb_eArgError, "circular causes"); } } +#endif } return mesg; } |