| Age | Commit message (Collapse) | Author |
|
Fixes [Bug #20916]
Notes:
Merged: https://github.com/ruby/ruby/pull/12417
|
|
If we don't have the VM (e.g. printing memory leaks in LSAN after shutdown)
then we will crash when we try to print the bug report. This issue was
reported in: https://github.com/ruby/ruby/pull/12309#issuecomment-2555766525
Notes:
Merged: https://github.com/ruby/ruby/pull/12413
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12415
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12411
|
|
* Migrate standard library doc page to markdown
* Improve libraries listing and link to source code
* Fix grammar and improve phrasing
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Notes:
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
Since https://github.com/ruby/ruby/commit/cf711863cbe0b81be5ff0adfb64936137995cc4e, gemspecs are included because the default exclude is overwritten
Notes:
Merged: https://github.com/ruby/ruby/pull/12386
|
|
If we have local variables outside of the eval, the local variables names
are IDs. We convert these IDs to char * using rb_id2name. However, these
char * are actually Ruby strings, which may be embedded. This means that
it is not safe to rb_id2name and call any potential GC entrypoints because
if a GC compaction runs, the embedded string may move and the pointer will
change.
For example, if you compile with `-DRGENGC_CHECK_MODE=1`, then the following
script will crash:
GC.auto_compact = :empty
GC.stress = true
o = Object.new
eval("def o.m(k: 0) k end")
The crash message is:
test.rb:6: [BUG] Local with constant_id 1 does not exist
ruby 3.4.0dev (2024-12-17T18:34:57Z prism-local-compac.. 434346726c) +PRISM [arm64-darwin24]
-- C level backtrace information -------------------------------------------
miniruby(rb_print_backtrace+0x24) [0x10312fec4] vm_dump.c:823
miniruby(rb_print_backtrace) (null):0
miniruby(rb_vm_bugreport+0x2d4) [0x1031301b8] vm_dump.c:1155
miniruby(rb_bug_without_die_internal+0xa8) [0x102dd6a94] error.c:1097
miniruby(rb_bug+0x28) [0x102dd6b00] error.c:1115
miniruby(pm_lookup_local_index+0xec) [0x102d61e4c] prism_compile.c:1237
miniruby(pm_compile_node+0x45d0) [0x102d252f4] prism_compile.c:9334
miniruby(pm_compile_node+0x1864) [0x102d22588] prism_compile.c:8650
miniruby(pm_compile_node+0x65ec) [0x102d27310] prism_compile.c:9897
miniruby(pm_compile_scope_node+0x3008) [0x102d77bcc] prism_compile.c:6584
miniruby(pm_compile_node+0x5ec4) [0x102d26be8] prism_compile.c:9768
miniruby(pm_iseq_compile_node+0xac) [0x102d20bf0] prism_compile.c:10069
miniruby(pm_iseq_new_with_opt_try+0x2c) [0x102e7d088] iseq.c:1029
miniruby(rb_protect+0x108) [0x102dea9bc] eval.c:1033
miniruby(pm_iseq_new_with_opt+0x264) [0x102e7c444] iseq.c:1082
miniruby(pm_iseq_new_eval+0xec) [0x102e7c8e0] iseq.c:961
miniruby(pm_eval_make_iseq+0x594) [0x1031209cc] vm_eval.c:1770
miniruby(eval_make_iseq+0x54) [0x103120068] vm_eval.c:1799
Notes:
Merged: https://github.com/ruby/ruby/pull/12374
|
|
We've already computed the length of the string, so we can reuse it.
Notes:
Merged: https://github.com/ruby/ruby/pull/12374
|
|
Fixes [Bug #20973]
Notes:
Merged: https://github.com/ruby/ruby/pull/12408
|
|
Put a pop as needed. This example currently causes [BUG]:
$ ruby --parser=prism -e'1.times{"".freeze;nil}'
-e:1: [BUG] Stack consistency error (sp: 15, bp: 14)
ruby 3.4.0dev (2024-12-20T00:48:01Z master 978df259ca) +PRISM [x86_64-linux]
Notes:
Merged: https://github.com/ruby/ruby/pull/12410
|
|
* TCPSocket.new: Close resources in ensure
* TCPSocket.new: Remove unnecessary comments
* Socket.tcp: Make assert_separately in TestSocket more readable
* Socket.tcp: Returning instead of exiting
* Socket.tcp: Close resources in ensure
* Socket.tcp: Avoid test failures on hosts that only support IPv4
Notes:
Merged-By: shioimm <shioi.mm@gmail.com>
|
|
[Bug #20942]
If we've raised a memerror while the VM is locked, and the tag we're
jumping to has been locked at a different level to the current lock (ie.
we've locked the VM again since the tag we're jumping to) then we should
consider this memerror fatal and exit, since the tag cannot unlock the
VM.
Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
Notes:
Merged: https://github.com/ruby/ruby/pull/12393
|
|
* Clean up skip tests
* Bundle rbs-3.8.0.pre.1
Notes:
Merged-By: soutaro <matsumoto@soutaro.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12391
|
|
The poison status is maintained by the GC, so don't unpoison it in vm_ccs_free.
If the object is not a garbage object, then it should not be poisoned.
Notes:
Merged: https://github.com/ruby/ruby/pull/12402
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12379
|
|
`struct rb_callcache *` point to an imemo object on the GC heap when
pushed into `struct rb_class_cc_entries`, but by the time vm_ccs_free()
runs, the entire GC page the imemo was on could already be deallocated.
With the right conditions, vm_ccs_free() wrote to freed memory.
rb_objspace_garbage_object_p() by itself is not enough to determine
liveness.
I conjectured this situation to be possible in
<https://github.com/ruby/ruby/pull/11995> using hints from crashes
in the wild. With c37bdfa5311be0aa8503b995299fb9547cede0a6 ("Make
asan_poison_object poison the whole slot"), the in-tree test suite
now recreates this scenario[^1][^2][^3].
Use rb_gc_pointer_to_heap_p(). Other uses of
rb_objspace_garbage_object_p() could be making the same mistake, but
correcting them might introduce serious performance regressions, so
leave them alone for now.
[^1]: http://ci.rvm.jp/results/trunk_asan@ruby-sp1/5477412
[^2]: http://ci.rvm.jp/results/trunk_asan@ruby-sp1/5477445
[^3]: http://ci.rvm.jp/results/trunk_asan@ruby-sp1/5477448
Notes:
Merged: https://github.com/ruby/ruby/pull/12401
Merged-By: XrXr
|
|
It used to quote only part of the method name because NUL byte in
the method terminates the C string:
```
(irb)> "abcdef".encode("UTF-16LE").bytes
=> [97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0]
```
```
expected: /abcdef/
actual: warning: Skipping set of ruby2_keywords flag for a (method not defined in Ruby)\n".
```
Notes:
Merged: https://github.com/ruby/ruby/pull/12396
Merged-By: XrXr
|
|
For the universal parser, `rb_reg_named_capture_assign_iter_impl`
function is shared between the parser and ripper. However
`parser_params` struct is partially different, and `assignable`
function depends on that part indirectly.
Notes:
Merged: https://github.com/ruby/ruby/pull/12400
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
If we try to use GET_PAGE_HEADER, it can trigger the read barrier. If we
try to align on the slot then we end up unlocking the heap page of a
lower memory address.
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
This change poisons the whole slot of the object rather than just the flags.
This allows ASAN to find any reads/writes into the slot after it has been
freed.
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12390
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12390
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12390
|
|
|
|
Also fixes [Bug #20955]
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
|
|
|
|
https://github.com/ruby/logger/commit/216cedef7c
|
|
`/dev/null` is not available on wasm.
https://github.com/ruby/logger/commit/4be05c2208
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12397
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
https://github.com/ruby/json/commit/f745ec145e
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
Check for existence of strnlen() and use alternative code if it is missing.
https://github.com/ruby/json/commit/48d4bbc3a0
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
https://github.com/ruby/rdoc/commit/2b79892ab4
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
(https://github.com/ruby/rdoc/pull/1238)
Hide navigation sidebar when clicking anchor links on mobile devices.
Previously, anchor links would change the page but the navigation
sidebar would block the view.
https://github.com/ruby/rdoc/commit/f12a96b7fa
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
(https://github.com/ruby/irb/pull/1050)
https://github.com/ruby/irb/commit/49050f9bf3
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12392
|
|
Notes:
Merged-By: zverok <zverok.offline@gmail.com>
|
|
The inspect format was intentionally changed as an outcome of
[Bug #20433] [ruby-core:118668], but some documentation update
was missing, as [Bug #20962] pointed out. Update some output
examples that clearly use Hash#inspect.
Notes:
Merged: https://github.com/ruby/ruby/pull/12384
Merged-By: XrXr
|
|
The macro MAYBE_UNUSED, prepared by ./configure, may not be defined in
some environments such as Oracle Developer Studio 12.5 on Solaris 10.
This fixes [Bug #20963]
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12383
|
|
|
|
|