ruby/internal
S-H-GAMELINKS 060a71d4e7 Fix Ripper memory allocation size when enabled Universal Parser
The size of `struct parser_params` is 8 bytes difference in `ripper_s_allocate` and `rb_ruby_parser_allocate` when the universal parser is
enabled.
This causes a situation where `*r->p` is not fully initialized in `ripper_s_allocate` as shown below.

```console
(gdb) p *r->p
$2 = {heap = 0x0, lval = 0x0, yylloc = 0x0, lex = {strterm = 0x0, gets = 0x0, input = 0, string_buffer = {head = 0x0, last = 0x0}, lastlin
e = 0x0,
    nextline = 0x0, pbeg = 0x0, pcur = 0x0, pend = 0x0, ptok = 0x0, gets_ = {ptr = 0, call = 0x0}, state = EXPR_NONE, paren_nest = 0, lpar
_seen = 0,
    debug = 0, has_shebang = 0, token_seen = 0, token_info_enabled = 0, error_p = 0, cr_seen = 0, value = 0, result = 0, parsing_thread = 0, s_value = 0,
    s_lvalue = 0, s_value_stack = 2097}
````

This seems to cause `double free or corruption (!prev)` and SEGV.
So, fixing this by introduce `rb_ripper_parser_params_allocate` and `rb_ruby_parser_config` functions for Ripper, and `struct parser_params` same size is returned.
2024-03-21 18:10:02 +09:00
..
array.h Suppress array-bounds warnings from gcc 13 2023-11-07 23:19:51 +09:00
basic_operators.h Emit special instruction for array literal + .(hash|min|max) 2023-04-18 17:16:22 -07:00
bignum.h Stop exporting symbols for MJIT 2023-03-06 21:59:23 -08:00
bits.h Make popcount bit-masks stricter 2023-10-05 20:03:54 +09:00
class.h Refactor VM root modules 2024-03-06 15:33:43 -05:00
cmdlineopt.h [Feature #19790] Rename BUGREPORT_PATH as CRASH_REPORT 2023-09-25 22:57:28 +09:00
compar.h Introduce BOP_CMP for optimized comparison 2022-12-06 12:37:23 -08:00
compile.h Move the PC regardless of the leaf flag (#8232) 2023-08-16 20:28:33 -07:00
compilers.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
complex.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
cont.h Free everything at shutdown 2023-12-07 15:52:35 -05:00
dir.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
enc.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
encoding.h Free everything at shutdown 2023-12-07 15:52:35 -05:00
enum.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
enumerator.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
error.h Free everything at shutdown 2023-12-07 15:52:35 -05:00
eval.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
file.h Revert "reuse open(2) from rb_file_load_ok on POSIX-like system" 2023-02-27 09:24:45 -08:00
fixnum.h Fix rb_fix_mul_fix on OpenBSD/mips64 2022-07-03 09:42:44 -07:00
gc.h Make rb_aligned_malloc private 2024-03-20 10:27:41 -04:00
hash.h Add rb_hash_free for the GC to use 2023-09-24 09:07:52 -04:00
imemo.h Extract imemo functions from gc.c into imemo.c 2024-02-22 11:35:09 -05:00
inits.h Revert "Pass down "stack start" variables from closer to the top of the stack" 2024-01-12 17:58:54 +11:00
io.h Define `IO_WITHOUT_GVL` macro 2024-01-24 20:51:50 +09:00
load.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
loadpath.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
math.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
missing.h Free environ when RUBY_FREE_AT_EXIT 2024-01-11 10:09:53 -05:00
numeric.h Faster Integer.sqrt for large bignum 2024-03-18 13:52:27 +09:00
object.h Move rb_class_allocate_instance from gc.c to object.c 2024-02-14 13:43:02 -05:00
parse.h Fix Ripper memory allocation size when enabled Universal Parser 2024-03-21 18:10:02 +09:00
proc.h Stop exporting symbols for MJIT 2023-03-06 21:59:23 -08:00
process.h Put `rb_fork` back into process.c 2023-05-21 23:00:27 +09:00
ractor.h internal/ractor.h: Added 2022-03-30 16:50:46 +09:00
random.h Free everything at shutdown 2023-12-07 15:52:35 -05:00
range.h Implement Struct on VWA 2023-06-05 15:47:16 -04:00
rational.h Don't redefine RB_OBJ_WRITE 2023-01-18 08:49:32 -05:00
re.h Stop allocating unused backref strings at `defined?` 2023-06-27 23:14:10 +09:00
ruby_parser.h Fix Ripper memory allocation size when enabled Universal Parser 2024-03-21 18:10:02 +09:00
sanitizers.h [DOC] Unify Doxygen formats (#10285) 2024-03-19 10:59:25 -07:00
serial.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
signal.h Move `posix_signal` declaration internal with prefix `ruby_` 2023-07-17 21:31:59 +09:00
st.h Move internal ST functions to internal/st.h 2023-12-25 10:41:12 -05:00
static_assert.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
string.h Implement chilled strings 2024-03-19 09:26:49 +01:00
struct.h Remove unused references to the transient heap 2023-07-13 14:48:14 -04:00
symbol.h Free everything at shutdown 2023-12-07 15:52:35 -05:00
thread.h Do not `poll` first 2024-01-05 05:51:25 +09:00
time.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
transcode.h Free everything at shutdown 2023-12-07 15:52:35 -05:00
util.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00
variable.h Fix compaction for generic ivars 2023-11-24 13:29:04 -05:00
vm.h `Exception#set_backtrace` accept arrays of `Backtrace::Location` 2024-03-14 11:38:40 +01:00
warnings.h internal/*.h: skip doxygen 2021-09-10 20:00:06 +09:00