diff options
| author | U.Nakamura <usa@ruby-lang.org> | 2023-07-18 21:04:42 +0900 |
|---|---|---|
| committer | U.Nakamura <usa@ruby-lang.org> | 2023-07-18 21:04:42 +0900 |
| commit | 3eea678b069aeec7f3a97437be204f65d5193e00 (patch) | |
| tree | a1f6d3f717f12153205626ffda3f67f408e30c8e /test/ruby | |
| parent | c96ef4eee6b27796bb15ba161ef936998acbcf96 (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 'test/ruby')
0 files changed, 0 insertions, 0 deletions
