| Age | Commit message (Collapse) | Author |
|
compile.c: Handle anonymous variables in `outer_variable_cmp`
[Bug #21370]
|
|
Fix memory leak with invalid yield in prism
[Bug #21383]
The following script leaks memory:
10.times do
20_000.times do
eval("class C; yield; end")
rescue SyntaxError
end
puts `ps -o rss= -p #{$$}`
end
Before:
16464
25536
29424
35904
39552
44576
46736
51600
56096
59824
After:
13488
16160
18240
20528
19760
21808
21680
22272
22064
22336
|
|
[Bug #21357] Fix crash in Hash#merge with block
Prior to https://github.com/ruby/ruby/commit/49b306ecb9e2e9e06e0b1590bacc5f4b38169c3c
the `optional_arg` passed from `rb_hash_update_block_i` to `tbl_update`
was a hash value (i.e. a VALUE). After that commit it changed to an
`update_call_args`.
If the block sets or changes the value, `tbl_update_modify` will set the
`arg.value` back to an actual value and we won't crash. But in the case
where the block returns the original value we end up calling
`RB_OBJ_WRITTEN` with the `update_call_args` which is not expected and
may crash.
`arg.value` appears to only be used to pass to `RB_OBJ_WRITTEN` (others
who need the `update_call_args` get it from `arg.arg`), so I don't think
it needs to be set to anything upfront. And `tbl_update_modify` will set
the `arg.value` in the cases we need the write barrier.
|
|
[Bug #21333] Prohibit hash modification inside Hash#update block
|
|
(#13327)
* [ruby/prism] Accept a newline after the defined? keyword
[Bug #21197]
https://github.com/ruby/prism/commit/22be955ce9
* Fix a compilation error
Co-authored-by: Stan Lo <stan001212@gmail.com>
---------
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
```
%VCPKG_BINARY_SOURCES%: warning: The 'x-gha' binary caching backend has been removed. Consider using a NuGet-based binary caching provider instead, see extended documentation at https://learn.microsoft.com/vcpkg/users/binarycaching?WT.mc_id=vcpkg_inproduct_cli.
on expression: clear;x-gha,readwrite
```
|
|
|
|
https://developercommunity.visualstudio.com/t/warning-C5287:-operands-are-different-e/10877942?
It is not able to silence "operands are different enum types"
warnings, even using an explicit cast, as the message says.
|
|
|
|
|
|
```
x64-vcruntime140-ruby350.def : error LNK2001: unresolved external symbol Avx2WmemEnabledWeakValue
```
|
|
|
|
We clear the CFP first so that if a sampling profiler interrupts the current thread during `rb_ec_set_vm_stack`,
`thread_profile_frames` returns early instead of trying to walk the stack that's no longer set on the ec.
The early return in `thread_profile_frames` was introduced at eab7f4623fb.
Fixes [Bug #21441]
|
|
This change addresses the following ASAN error:
```
==36597==ERROR: AddressSanitizer: heap-use-after-free on address 0x512000396ba8 at pc 0x7fcad5cbad9f bp 0x7fff19739af0 sp 0x7fff19739ae8
WRITE of size 8 at 0x512000396ba8 thread T0
[643/756] 36600=optparse/test_summary
#0 0x7fcad5cbad9e in free_fast_fallback_getaddrinfo_entry /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/raddrinfo.c:3046:22
#1 0x7fcad5c9fb48 in fast_fallback_inetsock_cleanup /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/ipsocket.c:1179:17
#2 0x7fcadf3b611a in rb_ensure /home/runner/work/ruby-dev-builder/ruby-dev-builder/eval.c:1081:5
#3 0x7fcad5c9b44b in rsock_init_inetsock /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/ipsocket.c:1289:20
#4 0x7fcad5ca22b8 in tcp_init /home/runner/work/ruby-dev-builder/ruby-dev-builder/ext/socket/tcpsocket.c:76:12
#5 0x7fcadf83ba70 in vm_call0_cfunc_with_frame /home/runner/work/ruby-dev-builder/ruby-dev-builder/./vm_eval.c:164:15
...
```
A `struct fast_fallback_getaddrinfo_shared` is shared between the main thread and two child threads.
This struct contains an array of `fast_fallback_getaddrinfo_entry`.
`fast_fallback_getaddrinfo_entry` and `fast_fallback_getaddrinfo_shared` were freed separately, and if `fast_fallback_getaddrinfo_shared` was freed first and then an attempt was made to free a `fast_fallback_getaddrinfo_entry`, a `heap-use-after-free` could occur.
This change avoids that possibility by separating the deallocation of the addrinfo memory held by `fast_fallback_getaddrinfo_entry` from the access and lifecycle of the `fast_fallback_getaddrinfo_entry` itself.
|
|
`free_fast_fallback_getaddrinfo_*` (#12661)
Ensure that `getaddrinfo_entry` and `getaddrinfo_shared` exist before free them in the main thread.
|
|
Fix generic_ivar_set_shape_ivptr for table rebuild
[Bug #21438]
Previously GC could trigger a table rebuild of the generic ivar
st_table in the middle of calling the st_update callback. This could
cause entries to be reallocated or rearranged and the update to be for
the wrong entry.
This commit adds an assertion to make that case easier to detect, and
replaces the st_update with a separate st_lookup and st_insert.
Also free after insert in generic_ivar_set_shape_ivptr
Previously we were performing a realloc and then inserting the new value
into the table. If the table was flagged as requiring a rebuild, this
could trigger GC work and marking within that GC could access the ivptr
freed by realloc.
Co-authored-by: John Hawthorn <john@hawthorn.email>
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
* Sync lockfile from rubygems/rubygems
* Restore lockfile for test-bundler
In the past, bundler updated platform without normalized variable like arm64-darwin-23.
We ignored that update. But the current bundler uses arm64-darwin for that.
---------
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
|
|
|
|
|
|
https://github.com/rubygems/rubygems/commit/d74fa0fdda481043112f9de179be572b74a711ed"
This reverts commit 7dcfdf1d7d1b1d13ab9bdc6f2b4bb89c78629332.
|
|
That way it works even if no Bundler specs have run before.
|
|
https://github.com/ruby/ruby/actions/runs/14585602800/job/40910453142
|
|
6.14.0
https://github.com/ruby/ruby/actions/runs/15199473008/job/42750815986?pr=13421
```
Error: ArgumentError: wrong number of arguments (given 0, expected 1)
/Users/runner/work/ruby/ruby/src/lib/rdoc/store.rb:123:in 'initialize'
/Users/runner/work/ruby/ruby/src/gems/src/rbs/test/rbs/rdoc/rbs_parser_test.rb:8:in 'Class#new'
/Users/runner/work/ruby/ruby/src/gems/src/rbs/test/rbs/rdoc/rbs_parser_test.rb:8:in 'RDocPluginParserTest#parser'
/Users/runner/work/ruby/ruby/src/gems/src/rbs/test/rbs/rdoc/rbs_parser_test.rb:147:in 'RDocPluginParserTest#test_instance_method_comment_and_tokens'
```
|
|
|
|
https://github.com/rubygems/rubygems/commit/d74fa0fdda481043112f9de179be572b74a711ed
|
|
|
|
|
|
As reported in <https://bugs.ruby-lang.org/issues/21340>, older autoconf
have an AC_HEADER_STDBOOL that's incompatible with C23. Autoconf 2.72
fixed the macro, but also mentions that it's obsolescent since all
current compilers have this header.
Since we require C99 [1] and VS 2015 [2], should be able take
that suggestion and include stdbool.h without a check. This worked
fine on rubyci.org.
[Backport #21340]
[1]: https://bugs.ruby-lang.org/issues/15347
[2]: https://bugs.ruby-lang.org/issues/19982
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This reverts commit bb180b87b43c45e17ff49735a26d7a188d5c8396, which
caused "malloc during GC" error on wasm.
|
|
b48b841378f80e16378ceb83f3b78e52df9ae023, 2fe8b9cd3d308d754f3d33a948dfb1dd782a10dc: [Backport #21327]
Fix redefinition of `clock_gettime` and `clock_getres`
winpthreads-git 12.0.0.r720 provides `clock_gettime` and
`clock_getres` as inline functions.
digest.so needs ruby/digest.h which is installed by build-ext
Copy to path with the base name
|
|
[Bug #21331] Prohibit modification during stlike loop
|
|
Backport [Bug #21286]
|
|
|
|
|
|
[Backport #21289]
|
|
https://github.com/rubygems/rubygems/commit/77a52b011a
|
|
|