[ruby-core:113186] [Ruby master Bug#19589] Expecting system stack error but crashing
From:
"byroot (Jean Boussier) via ruby-core" <ruby-core@...>
Date:
2023-04-11 09:05:11 UTC
List:
ruby-core #113186
Issue #19589 has been updated by byroot (Jean Boussier).
I have a fix for it: https://github.com/ruby/ruby/pull/7686
The flag operation in `hash_iter_lev_dec` was incorrect and could corrupt the object.
I think the bug is older than shapes introduction, but before it would corrupt unused memory. I still need to double check it doesn't have any other adverse effect on older rubies.
----------------------------------------
Bug #19589: Expecting system stack error but crashing
https://bugs.ruby-lang.org/issues/19589#change-102725
* Author: alpaca-tc (Hiroyuki Ishii)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0dev (2023-04-11T00:54:20Z master 65e276096f) [arm64-darwin22]
* Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED
----------------------------------------
The following code expects stack overflow but crashes.
The version it occurs in is newer than 3.2.0.
```
def expect_system_stack_error(h)
h.each_key {}
h.each_value { expect_system_stack_error(h) }
end
expect_system_stack_error(a: nil)
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/