diff options
| author | nagachika <nagachika@ruby-lang.org> | 2023-07-17 09:51:53 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2023-07-17 09:51:53 +0900 |
| commit | 62763658d53a66ad624e1c730742cb3811d18329 (patch) | |
| tree | cd3c325d61512a3044c26f0c183b00b98e979928 /string.c | |
| parent | 98b4ac7287928c202c90e9de1ae02c0707ec68b8 (diff) | |
merge revision(s) 52e571fa72debcd764765775bd1b76ee87e36d2d: [Backport #19580]
Ensure ruby_xfree won't segfault if called after vm_destruct
[Bug #19580]
The real-world scenario motivating this change is libxml2's pthread
code which uses `pthread_key_create` to set up a destructor that is
called at thread exit to free thread-local storage.
There is a small window of time -- after ruby_vm_destruct but before
the process exits -- in which a pthread may exit and the destructor is
called, leading to a segfault.
Please note that this window of time may be relatively large if
`atexit` is being used.
---
gc.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Diffstat (limited to 'string.c')
0 files changed, 0 insertions, 0 deletions
