Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Koichi Sasada 7ba2506232 check modifcation whil ar->st
* delete `ar_try_convert` but use `ar_force_convert_table`
  to make program simple.
* `ar_force_convert_table` checks hash modification while
  calling `#hash` method with the following strategy:

1. copy keys (and vals) of ar_table
2. calc hashes from keys
3. check copied keys and hash's keys. if not matched, repeat from 1

fix [Bug #20050]
2023-12-15 11:58:43 +09:00
jinroq a70320b8cd Define `NO_SANITIZE` with reference to ext/bigdecimal/missing.c 2023-07-01 23:16:54 +09:00
Peter Zhu f0d08d11dc Fix memory leak when copying ST tables
st_copy allocates a st_table, which is not needed for hashes since it is
allocated by VWA and embedded, so this causes a memory leak.

The following script demonstrates the issue:

```ruby
20.times do
  100_000.times do
    {a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9}
  end

  puts `ps -o rss= -p #{$$}`
end
```
2023-06-29 11:16:50 -04:00
Nobuyoshi Nakada c94b5f121d De-duplicate parse_st.c code from st.c 2023-06-24 19:17:37 +09:00
Nobuyoshi Nakada 3443e43b62 Remove `st_functions_t` 2023-06-24 19:17:37 +09:00
Nobuyoshi Nakada 1ff2094410 Copy `nonempty_memcpy` without ruby implementation 2023-06-16 22:32:52 +09:00
Nobuyoshi Nakada 60cf48ca4f Suppress redefined macro warnings 2023-06-16 22:32:52 +09:00
yui-knk b481b673d7 [Feature #19719] Universal Parser
Introduce Universal Parser mode for the parser.
This commit includes these changes:

* Introduce `UNIVERSAL_PARSER` macro. All of CRuby related functions
  are passed via `struct rb_parser_config_struct` when this macro is enabled.
* Add CI task with 'cppflags=-DUNIVERSAL_PARSER' for ubuntu.
2023-06-12 18:23:48 +09:00