[#120465] [Ruby master Bug#20998] rb_str_locktmp() changes flags of frozen strings and string literals — "Eregon (Benoit Daloze) via ruby-core" <ruby-core@...>
Issue #20998 has been reported by Eregon (Benoit Daloze).
17 messages
2025/01/03
[ruby-core:120681] [Ruby master Bug#20907] Fiber scheduler does not correctly re-lock mutex if `Mutex#sleep` is interrupted.
From:
"k0kubun (Takashi Kokubun) via ruby-core" <ruby-core@...>
Date:
2025-01-15 01:48:19 UTC
List:
ruby-core #120681
Issue #20907 has been updated by k0kubun (Takashi Kokubun).
Backport changed from 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: DONE
ruby_3_3 commit:f19831a15d680fd995ceaecad1157282be7182dc merged revision(s) commit:a8c2d5e7bee5fad0965baeb58d312ddc5932ec26.
----------------------------------------
Bug #20907: Fiber scheduler does not correctly re-lock mutex if `Mutex#sleep` is interrupted.
https://bugs.ruby-lang.org/issues/20907#change-111504
* Author: ioquatix (Samuel Williams)
* Status: Closed
* Assignee: ioquatix (Samuel Williams)
* Backport: 3.1: REQUIRED, 3.2: DONE, 3.3: DONE
----------------------------------------
The following test fails with a `ThreadError` instead of a `RuntimeError`:
```ruby
def test_condition_variable
condition_variable = ::Thread::ConditionVariable.new
mutex = ::Thread::Mutex.new
error = nil
thread = Thread.new do
Thread.current.report_on_exception = false
scheduler = Scheduler.new
Fiber.set_scheduler scheduler
fiber = Fiber.schedule do
begin
mutex.synchronize do
condition_variable.wait(mutex)
end
rescue => error
end
end
fiber.raise(RuntimeError)
end
thread.join
assert_kind_of RuntimeError, error
end
```
Fix: https://github.com/ruby/ruby/pull/12158
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/