Files
mruby-mruby/include/mruby
Yukihiro "Matz" Matsumoto d42326ce80 khash.h: make khash rebuild GC-safe
The hash rebuild process was not GC-safe. When rebuilding the hash
table, the old data was orphaned before the new table was fully
populated, which could lead to a segmentation fault if a GC cycle
was triggered during the process.

This patch refactors the rebuild function to follow a safer pattern:
- A new temporary hash table is allocated on the stack.
- Elements from the original table are copied to the new one.
- The original table's data is swapped with the new table's data
  only after the new table is complete.

This ensures the original data is always reachable by the GC during
the rebuild.

Co-authored-by: Gemini <gemini@google.com>
2025-08-19 10:06:19 +09:00
..
2024-06-27 22:46:13 +02:00
2025-03-07 17:17:50 +09:00
2023-05-03 22:12:59 +10:00
2024-09-10 21:07:43 +09:00
2025-08-19 10:06:19 +09:00
2024-12-01 19:16:54 +09:00
2019-08-18 20:12:44 +09:00
2025-06-25 10:46:23 +10:00