| Age | Commit message (Collapse) | Author |
|
|
|
Before this patch, Ractor::IsolationError reported an incorrect constant
path when constant was found through `rb_const_get_0()`.
In this code, Ractor::IsolationError reported illegal access against
`M::TOPLEVEL`, where it should be `Object::TOPLEVEL`.
```ruby
TOPLEVEL = [1]
module M
def self.f
TOPLEVEL
end
end
Ractor.new { M.f }.value
```
This was because `rb_const_get_0()` built the "path" part referring to
the module/class passed to it in the first place. When a constant was
found through recursive search upwards, the module/class which the
constant was found should be reported.
This patch fixes this issue by modifying rb_const_search() to take a
VALUE pointer to be filled with the module/class where the constant was
found.
[Bug #21782]
|
|
|
|
rb_gc_writebarrier() in gen_write_barrier()
* To avoid calling rb_gc_writebarrier() with an immediate value in gen_write_barrier(),
and avoid the LIR jump issue.
|
|
gen_write_barrier()"
* This reverts commit 623559faa3dd0927b4034a752226a30ae8821604.
* There is an issue with the jump in LIR, see https://github.com/ruby/ruby/pull/15542.
|
|
|
|
|
|
gen_write_barrier()
|
|
not hold
|
|
This guard was removed in https://github.com/ruby/ruby/pull/13497
on the justification that some GC may need to be notified even for
immediate.
But the two currently available GCs don't, and there are plenty
of assumtions GCs don't everywhere, notably in YJIT and ZJIT.
This optimization is also not so micro (but not huge either).
I routinely see 1-2% wasted there on micro-benchmarks.
So perhaps if in the future we actually need this, it might make
sense to introduce a way for GCs to declare that as an option,
but in the meantime it's extra overhead with little gain.
|
|
For <https://bugs.ruby-lang.org/issues/21716>, the panic is looking like
some sort of third party memory corruption, with YJIT taking the fall.
At the point of this assert, the assembler has dropped, so there's
nothing in YJIT's code other than JITState that could be holding on to
these transient `PendingBranchRef`.
The strong count being more than a handful or the weak count is non-zero
shows that someone in the process (likely some native extension)
corrupted the Rc's counts.
|
|
This reverts commit 2f151e76b5dc578026706b31f054d5caf5374b05.
The SP decrement (push) before the call do not match up with
the pops after the call, so registers were restored incorrectly.
Code from:
./miniruby --zjit-call-threshold=1 --zjit-dump-disasm -e 'p Time.new(1992, 9, 23, 23, 0, 0, :std)'
str x11, [sp, #-0x10]!
str x12, [sp, #-0x10]!
stur x7, [sp] # last argument
mov x0, x20
mov x7, x6
mov x6, x5
mov x5, x4
mov x4, x3
mov x3, x2
mov x2, x1
ldur x1, [x29, #-0x20]
mov x16, #0xccfc
movk x16, #0x2e7, lsl #16
movk x16, #1, lsl #32
blr x16
ldr x12, [sp], #0x10 # supposed to match str x12, [sp, #-0x10]!, but got last argument
ldr x11, [sp], #0x10
|
|
Before this change, GC'ing any Ractor object caused you to lose all
enabled tracepoints across all ractors (even main). Now tracepoints are
ractor-local and this doesn't happen. Internal events are still global.
Fixes [Bug #19112]
|
|
Casting a pointer to create an unaligned one is undefined behavior in C
standards. Use memcpy to express the unaligned load instead to play by
the rules.
Practically, this yields the same binary output in many situations
while fixing the crash in [Bug #21715].
|
|
|
|
|
|
|
|
|
|
This change fixes a bug where, with `Socket.tcp`’s `fast_fallback option` disabled, specifying `open_timeout` could unintentionally pass a negative value to `Addrinfo#connect_internal`, `causing an ArgumentError`.
```
❯ ruby -rsocket -e 'p Socket.tcp("localhost", 9292, open_timeout: 1, fast_fallback: false)'
/Users/misaki-shioi/src/install/lib/ruby/4.0.0+0/socket.rb:64:in 'IO#wait_writable': time interval must not be negative (ArgumentError)
sock.wait_writable(timeout) or
^^^^^^^
from /Users/misaki-shioi/src/install/lib/ruby/4.0.0+0/socket.rb:64:in 'Addrinfo#connect_internal'
from /Users/misaki-shioi/src/install/lib/ruby/4.0.0+0/socket.rb:141:in 'Addrinfo#connect'
from /Users/misaki-shioi/src/install/lib/ruby/4.0.0+0/socket.rb:964:in 'block in Socket.tcp_without_fast_fallback'
from /Users/misaki-shioi/src/install/lib/ruby/4.0.0+0/socket.rb:231:in 'Array#each'
from /Users/misaki-shioi/src/install/lib/ruby/4.0.0+0/socket.rb:231:in 'Addrinfo.foreach'
from /Users/misaki-shioi/src/install/lib/ruby/4.0.0+0/socket.rb:945:in 'Socket.tcp_without_fast_fallback'
from /Users/misaki-shioi/src/install/lib/ruby/4.0.0+0/socket.rb:671:in 'Socket.tcp'
from -e:1:in '<main>'
```
|
|
Since it now live in the EC.
|
|
Mutexes spend a significant amount of time in `rb_fiber_serial`
because it can't be inlined (except with LTO).
The fiber struct is opaque the so function can't be defined as inlineable.
Ideally the while fiber struct would not be opaque to the rest of
Ruby core, but it's tricky to do.
Instead we can store the fiber serial in the execution context
itself, and make its access cheaper:
```
$ hyperfine './miniruby-baseline --yjit /tmp/mut.rb' './miniruby-inline-serial --yjit /tmp/mut.rb'
Benchmark 1: ./miniruby-baseline --yjit /tmp/mut.rb
Time (mean ± σ): 4.011 s ± 0.084 s [User: 3.977 s, System: 0.011 s]
Range (min … max): 3.950 s … 4.245 s 10 runs
Benchmark 2: ./miniruby-inline-serial --yjit /tmp/mut.rb
Time (mean ± σ): 3.495 s ± 0.150 s [User: 3.448 s, System: 0.009 s]
Range (min … max): 3.340 s … 3.869 s 10 runs
Summary
./miniruby-inline-serial --yjit /tmp/mut.rb ran
1.15 ± 0.05 times faster than ./miniruby-baseline --yjit /tmp/mut.rb
```
```ruby
i = 10_000_000
mut = Mutex.new
while i > 0
i -= 1
mut.synchronize { }
mut.synchronize { }
mut.synchronize { }
mut.synchronize { }
mut.synchronize { }
mut.synchronize { }
mut.synchronize { }
mut.synchronize { }
mut.synchronize { }
mut.synchronize { }
end
```
|
|
|
|
Also remove a stale TODO.
|
|
|
|
|
|
|
|
and columns"
This reverts commit 073c4e1cc712064e626914fa4a5a8061f903a637.
https://bugs.ruby-lang.org/issues/6012#note-31
> we will cancel this feature in 4.0 because of design ambiguities
> such as whether to return column positions in bytes or characters as
> in [#21783].
[#21783]: https://bugs.ruby-lang.org/issues/21783
|
|
https://github.com/ruby/rubygems/commit/be5c4e27d9
|
|
https://github.com/ruby/rubygems/commit/09e6031a11
|
|
- Added a new `-j` option to `gem install` and `gem update`.
This option allows to specify the number of jobs we pass to `make`
when compiling gem with native extensions.
By default its the number of processors, but users may want a way
to control this.
You can use it like so: `gem install json -j8`
https://github.com/ruby/rubygems/commit/67aad88ca6
|
|
- ### Problem
Since https://github.com/ruby/rubygems/pull/9131, we are now
compiling make rules simultaneously. The number of jobs
is equal to the number of processors.
This may be problematic for some users as they want to control
this value.
### Solution
The number of jobs passed to `make` will now be equal to the
`BUNDLE_JOBS` value.
### Side note
It's also worth to note that since Bundler installs gems in
parallel, we may end up running multiple `make -j<JOB>` in parallel
which would cause exhaust the number of processors we have.
This problem can be fixed by implementing a GNU jobserver, which I
plan to do. But I felt that this would be too much change in one PR.
https://github.com/ruby/rubygems/commit/d51995deb9
|
|
Fixes [Bug #21266].
|
|
The previous regex didn't properly match quoted strings
it would capture the opening quote as part of the version
if quotes were mismatched.
This change properly parses double-quoted, single-quoted,
and unquoted version strings separately.
https://github.com/ruby/rubygems/commit/81e48c8185
|
|
https://github.com/ruby/rubygems/commit/a7d7ab39dd
|
|
This can happen with documentation updates and we don't want
those to trip on ZJIT tests.
Redact the whole name since names like "_bi342" aren't that helpful
anyways.
|
|
https://github.com/ruby/rubygems/commit/a091e3fd10
|
|
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/a7833574556fa59680c1b7cb190c1735db73ebf0...9255dc7a253b0ccc959486e2bca901246202afeb)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-version: 5.0.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
|
|
- Fix https://github.com/ruby/rubygems/pull/9188
- This message is a bit misleading because it always outputs one extra
specs, which is Bundler itself.
This is now fixed when the message is about to be output.
https://github.com/ruby/rubygems/commit/70b4e19506
|
|
- Fix https://github.com/ruby/rubygems/pull/9186
- ### Problem
Running `bundle pristine` in a Gemfile where there is many git gem
pointing to the same repository will result in a error
"Another git process seems to be running in this repository".
### Context
This error is a regression since https://github.com/ruby/rubygems/commit/a555fd6ccd17
where `bundle pristine` now runs in parallel which could lead
to running simultaneous git operations in the same repository.
### Solution
When Bundler pristine a git gem it does a `git reset --hard` without
specifying a path.
This means the whole repository will be reset. In this case, we can
leverage that by just pristining one gem per unique git sources.
This is also more efficient.
https://github.com/ruby/rubygems/commit/710ba514a8
|
|
Fix https://github.com/Shopify/ruby/issues/900
|
|
* Fixes https://github.com/ruby/psych/issues/760
https://github.com/ruby/psych/commit/952008c898
|
|
https://github.com/ruby/psych/commit/6a826693ba
|
|
|
|
|
|
|
|
This reverts commit 3038286a4bf7832f1c42c8cc9774ee6ff19876fc.
The following CI failure scared me:
https://github.com/ruby/ruby/actions/runs/20241051861/job/58108997049
```
1) Timeout:
TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback
```
Since it could be related, I'm reverting this for now.
|
|
|
|
https://github.com/ruby/erb/commit/bbde68fcd5
|
|
(https://github.com/ruby/erb/pull/100)
For Ractor compatibility.
https://github.com/ruby/erb/commit/43f0876595
|