summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-12-20Provide Ractor support for **Kevin Newton
Fixes [Bug #20916] Notes: Merged: https://github.com/ruby/ruby/pull/12417
2024-12-20Don't print bug report in asan_death_callback when no VMPeter Zhu
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
2024-12-20[DOC] Fix to GC.config docsMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/12415
2024-12-20[DOC] Document the :implementation key of GC.configMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/12411
2024-12-20[DOC] Refresh standard libraries page (#12404)Stan Lo
* 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>
2024-12-20[DOC] Don't document gemspec filesEarlopain
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
2024-12-20Fix GC compaction crash when using local variables in evalPeter Zhu
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
2024-12-20Don't recompute the strlen in pm_eval_make_iseqPeter Zhu
We've already computed the length of the string, so we can reuse it. Notes: Merged: https://github.com/ruby/ruby/pull/12374
2024-12-20[PRISM] Treat it as a local when compiling patternsMatt Valentine-House
Fixes [Bug #20973] Notes: Merged: https://github.com/ruby/ruby/pull/12408
2024-12-20[PRISM] Fix compiling popped opt_str_uminus and opt_str_freezeKazuki Yamaguchi
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
2024-12-20Fix tests for fast_fallback (#12406)Misaki Shioi
* 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>
2024-12-20Memerror is fatal if VM cannot be unlocked.Matt Valentine-House
[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
2024-12-20Bundle rbs-3.8 (#12399)Soutaro Matsumoto
* Clean up skip tests * Bundle rbs-3.8.0.pre.1 Notes: Merged-By: soutaro <matsumoto@soutaro.com>
2024-12-19[DOC] Link to special `fatal` class through `rdoc-ref`Stan Lo
Notes: Merged: https://github.com/ruby/ruby/pull/12391
2024-12-19Don't unpoison the CC in vm_ccs_freePeter Zhu
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
2024-12-19[DOC] Add gc/README.mdPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/12379
2024-12-19Fix use-after-free in vm_ccs_free()Alan Wu
`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
2024-12-19ruby2_keywords warnings: Quote non-UTF8 method names fullyAlan Wu
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
2024-12-19[Bug #20969] Pass `assignable` from ripperNobuyoshi Nakada
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
2024-12-19Prefix asan_poison_object with rbPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/12385
2024-12-19Fix compaction in ASAN with RGENGC_CHECK_MODE enabledPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/12385
2024-12-19Export asan_poison_objectPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/12385
2024-12-19Don't calculate the aligned slot when unlocking pagePeter Zhu
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
2024-12-19Don't unpoison a NULL objectPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/12385
2024-12-19Unpoison memory before accessing next element of freelistPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/12385
2024-12-19Make asan_poison_object poison the whole slotPeter Zhu
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
2024-12-19Fixed label typoHiroshi SHIBATA
2024-12-19Fix bundled gems' indentations and link to their reposStan Lo
Notes: Merged: https://github.com/ruby/ruby/pull/12390
2024-12-19Link to default gems' github reposStan Lo
Notes: Merged: https://github.com/ruby/ruby/pull/12390
2024-12-19Fix release entries' indentationStan Lo
Notes: Merged: https://github.com/ruby/ruby/pull/12390
2024-12-19[DOC] Remove Unused footnotes [ci skip]Kazuhiro NISHIYAMA
2024-12-18[Bug #20965] Define `it` like an ordinary argument (#12398)Nobuyoshi Nakada
Also fixes [Bug #20955] Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2024-12-19Update NEWS.md with debug-1.10.0Hiroshi SHIBATA
2024-12-19Update with logger-1.6.4Hiroshi SHIBATA
2024-12-19[ruby/logger] v1.6.4Hiroshi SHIBATA
https://github.com/ruby/logger/commit/216cedef7c
2024-12-19[ruby/logger] Use `__FILE__` for wasmNobuyoshi Nakada
`/dev/null` is not available on wasm. https://github.com/ruby/logger/commit/4be05c2208
2024-12-19The test of net-imap is passed with WindowsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12397
2024-12-19Added the latest versions of irb, json and rdoc to NEWSHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12394
2024-12-19[ruby/json] Release 2.9.1Jean Boussier
https://github.com/ruby/json/commit/f745ec145e Notes: Merged: https://github.com/ruby/ruby/pull/12394
2024-12-19[ruby/json] Add support for Solaris 10 which lacks strnlen()Naohisa Goto
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
2024-12-19[ruby/rdoc] Bump version to v6.10.0Stan Lo
https://github.com/ruby/rdoc/commit/2b79892ab4 Notes: Merged: https://github.com/ruby/ruby/pull/12394
2024-12-19[ruby/rdoc] Auto-hide navigation on link clickJames Reid-Smith
(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
2024-12-19[ruby/irb] Bump version to v1.14.3Stan Lo
(https://github.com/ruby/irb/pull/1050) https://github.com/ruby/irb/commit/49050f9bf3 Notes: Merged: https://github.com/ruby/ruby/pull/12394
2024-12-19debug v1.10.0Koichi Sasada
Notes: Merged: https://github.com/ruby/ruby/pull/12392
2024-12-18Document 'it' and update numbered parameters docs (#12375)Victor Shepelev
Notes: Merged-By: zverok <zverok.offline@gmail.com>
2024-12-18[DOC] Fix output examples containing old Hash#inspect formattomoya ishida
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
2024-12-18use RBIMPL_ATTR_MAYBE_UNUSEDNaohisa Goto
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]
2024-12-18Get rid of duplicate modifier for MSVCNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12383
2024-12-18Removed unnecessary sentence for stdlibHiroshi SHIBATA
2024-12-18Fix the end of "dlext & soext" section [ci skip]Nobuyoshi Nakada