mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
afc0753c1d
track dynamic (runtime-created) symbols separately from presyms, inline symbols, and static C API symbols. raise RuntimeError when the dynamic symbol count exceeds MRB_SYMBOL_MAX (default 4096). this prevents DoS attacks via unbounded symbol creation (e.g. "str".to_sym in a loop). presyms and inline symbols are not counted toward the limit. infrastructure for future symbol GC: sym_flags array tracks per-symbol metadata (SYM_FL_DYNAMIC flag). Co-authored-by: Claude <noreply@anthropic.com>