diff options
author | Nobuyoshi Nakada <[email protected]> | 2025-04-24 11:01:42 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2025-04-24 17:28:18 +0900 |
commit | 5dc155351a23465ace10f32e8775fc5e23909d6e () | |
tree | 9ea744c384775d3b0982978cb2012998f995cb17 /vm_insnhelper.c | |
parent | cb1ea54bbf6cdf49c53f42720fec1a151069810c (diff) |
Do not allocate new objects at machine stack overflow
Notes: Merged: https://.com/ruby/ruby/pull/13167
-rw-r--r-- | vm_insnhelper.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -79,22 +79,23 @@ vm_stackoverflow(void) } NORETURN(void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)); void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit) { if (rb_during_gc()) { rb_bug("system stack overflow during GC. Faulty native extension?"); } - if (crit) { ec->raised_flag = RAISED_STACKOVERFLOW; ec->errinfo = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_stackfatal]; EC_JUMP_TAG(ec, TAG_RAISE); } -#ifdef USE_SIGALTSTACK - ec_stack_overflow(ec, TRUE); -#else - ec_stack_overflow(ec, FALSE); -#endif } static inline void stack_check(rb_execution_context_t *ec); |