mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
merge revision(s) de51bbcb54
: [Backport #18816]
Use VM Lock when mutating waiting threads list `rb_thread_wait_for_single_fd` needs to mutate the `waiting_fds` list that is stored on the VM. We need to delete the FD from the list before returning, and deleting from the list requires a VM lock (because the list is a global). [Bug #18816] [ruby-core:108771] Co-Authored-By: Alan Wu <alanwu@ruby-lang.org> --- thread.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
This commit is contained in:
parent
8746383219
commit
99d254d8b0
2 changed files with 7 additions and 3 deletions
6
thread.c
6
thread.c
|
@ -4501,7 +4501,11 @@ select_single_cleanup(VALUE ptr)
|
||||||
{
|
{
|
||||||
struct select_args *args = (struct select_args *)ptr;
|
struct select_args *args = (struct select_args *)ptr;
|
||||||
|
|
||||||
list_del(&args->wfd.wfd_node);
|
RB_VM_LOCK_ENTER();
|
||||||
|
{
|
||||||
|
list_del(&args->wfd.wfd_node);
|
||||||
|
}
|
||||||
|
RB_VM_LOCK_LEAVE();
|
||||||
if (args->read) rb_fd_term(args->read);
|
if (args->read) rb_fd_term(args->read);
|
||||||
if (args->write) rb_fd_term(args->write);
|
if (args->write) rb_fd_term(args->write);
|
||||||
if (args->except) rb_fd_term(args->except);
|
if (args->except) rb_fd_term(args->except);
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
||||||
#define RUBY_VERSION_TEENY 3
|
#define RUBY_VERSION_TEENY 3
|
||||||
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
||||||
#define RUBY_PATCHLEVEL 52
|
#define RUBY_PATCHLEVEL 53
|
||||||
|
|
||||||
#define RUBY_RELEASE_YEAR 2022
|
#define RUBY_RELEASE_YEAR 2022
|
||||||
#define RUBY_RELEASE_MONTH 9
|
#define RUBY_RELEASE_MONTH 9
|
||||||
#define RUBY_RELEASE_DAY 16
|
#define RUBY_RELEASE_DAY 17
|
||||||
|
|
||||||
#include "ruby/version.h"
|
#include "ruby/version.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue