summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-22coroutine/arm64/Context.S: Insert `bti c` as BTI landing padYuta Saito
2023-12-22coroutine/arm64: Sign return address if PAC enabledYuta Saito
2023-12-21RJIT: Convert opt_case_dispatch keys with #to_valueTakashi Kokubun
comptime_key is a Ruby object and the value is not valid in machine code. This PR also implements `CMP r/m64, imm32 (Mod 01: [reg]+disp8)` that is now needed for running mail.gem benchmark.
2023-12-21Typo fixes for public headers [ci skip]Alan Wu
2023-12-21RJIT: Avoid incrementing vm_insns_countTakashi Kokubun
during compilation
2023-12-21RJIT: Clean up unnecessary documentationTakashi Kokubun
2023-12-21RJIT: Fix a wrong comparison in set_local_typeTakashi Kokubun
2023-12-21RJIT: Fix unwanted shadowing in set_local_typeTakashi Kokubun
local_idx should not be overwritten.
2023-12-21Make rb_profile_frames return 0 for NULL ecJohn Hawthorn
When using M:N threads, EC is set to NULL in the shared native thread when nothing is scheduled. This previously caused a segfault when we try to examine the EC. Returning 0 instead means we may miss profiling information, but a profiler relying on this isn't thread aware anyways, and observing that "nothing" is running is probably correct. Fixes [Bug #20017] Co-authored-by: Dustin Brown <dbrown9@gmail.com>
2023-12-21RJIT: Streamline RJIT enablement checkTakashi Kokubun
in bootstrap tests so that `make btest-bruby` skips the right tests.
2023-12-21RJIT: Rename pause/resume to disable/enableTakashi Kokubun
like YJIT. They don't work in the same way yet, but it's nice to make the naming consistent first so that we will not need to rename them later.
2023-12-21Update default gems list at 82496f2b389278a569fa7680ee6faa [ci skip]git
2023-12-22Merge RubyGems-3.5.2 and Bundler-2.5.2Hiroshi SHIBATA
2023-12-21[DOC] Improve NEWS.md rendering and add missing features (#9308)Victor Shepelev
* Fix rendering of the file on docs.ruby-lang.org: * More indentation for code; * Properly qualified methods to link to docs; * Add two minor yet notable changes: * Time.new stricter parsing of strings; * NoMethodError rendering logic change.
2023-12-21[DOC] Fix NoMethodError example of rendering (#9309)Victor Shepelev
Fix NoMethodError example of rendering
2023-12-21Use main_thread->ec from rb_vm_main_ractor_ecJohn Hawthorn
rb_vm_main_ractor_ec was introduced to allow rb_postponed_job_* to work when fired on non-Ruby threads, which have no EC set, and that is its only use. When RUBY_MN_THREADS=1 is set ractor->threads.running_ec is NULL when the shared thread is sleeping. This instead grabs the EC directly from the main thread which seems to always be set. Fixes [Bug #20016] Co-authored-by: Dustin Brown <dbrown9@gmail.com>
2023-12-21[DOC] Fix rb_postponed_job_register_once typoJohn Hawthorn
Co-authored-by: Dustin Brown <dbrown9@gmail.com>
2023-12-21Fix ary_make_partial_step for compactionPeter Zhu
ary could change embeddedness due to compaction, so we should only get the pointer after allocations. The included test was crashing with: TestArray#test_slice_gc_compact_stress ruby/lib/pp.rb:192: [BUG] Segmentation fault at 0x0000000000000038
2023-12-21Fix a typo in NEWS.mdJean Boussier
2023-12-21Added limitation of bundled gems warning feature with bootsnapHiroshi SHIBATA
2023-12-21Update bundled gems list at d587852cf7f660308d1287e85767ad [ci skip]git
2023-12-21Bundle RBS 3.4.0 (#9293)Soutaro Matsumoto
Bundle RBS 3.4.0 and TypeProf 0.21.9.
2023-12-20RJIT: Print an error message firstTakashi Kokubun
Creating a backtrace can crash if RJIT is triggered by branch_stub_hit. In that case, it's useful to at least print the error message.
2023-12-20Update default gems list at 31959f1f13c0dcbb517469b4cbf29a [ci skip]git
2023-12-20[ruby/irb] Bump version to v1.11.0Stan Lo
(https://github.com/ruby/irb/pull/818) https://github.com/ruby/irb/commit/7421359b92
2023-12-20[ruby/irb] [DOC] Change indexes.rdoc to indexes.mdBurdette Lamar
(https://github.com/ruby/irb/pull/812) * Change indexes.rdoc to indexes.md * Change indexes.rdoc to indexes.md * Change indexes.rdoc to indexes.md https://github.com/ruby/irb/commit/b1cd53cbf7
2023-12-20[ruby/irb] Warn users about errors in loading RC filesStan Lo
(https://github.com/ruby/irb/pull/817) 1. Because `IRB.rc_file` always generates an rc file name, even if the file doesn't exist, we should check the file exists before trying to load it. 2. If any type of errors occur while loading the rc file, we should warn the user about it. https://github.com/ruby/irb/commit/37ffdc6b19
2023-12-20Fix a grammar issue in the shape performance warning messageJean Boussier
2023-12-20skip `MAP_STACK` on FreeBSDKoichi Sasada
2023-12-20Hand thread into `thread_sched_wait_events_timeval`JP Camara
* When we have the thread already, it saves a lookup * `event_wait`, not `kq` Clean up the `thread_sched_wait_events_timeval` calls * By handling the PTHREAD check inside the function, all the other code can become much simpler and just call the function directly without additional checks
2023-12-20KQueue support for M:N threadsJP Camara
* Allows macOS users to use M:N threads (and technically FreeBSD, though it has not been verified on FreeBSD) * Include sys/event.h header check for macros, and include sys/event.h when present * Rename epoll_fd to more generic kq_fd (Kernel event Queue) for use by both epoll and kqueue * MAP_STACK is not available on macOS so conditionall apply it to mmap flags * Set fd to close on exec * Log debug messages specific to kqueue and epoll on creation * close_invalidate raises an error for the kqueue fd on child process fork. It's unclear rn if that's a bug, or if it's kqueue specific behavior Use kq with rb_thread_wait_for_single_fd * Only platforms with `USE_POLL` (linux) had changes applied to take advantage of kernel event queues. It needed to be applied to the `select` so that kqueue could be properly applied * Clean up kqueue specific code and make sure only flags that were actually set are removed (or an error is raised) * Also handle kevent specific errnos, since most don't apply from epoll to kqueue * Use the more platform standard close-on-exec approach of `fcntl` and `FD_CLOEXEC`. The io-event gem uses `ioctl`, but fcntl seems to be the recommended choice. It is also what Go, Bun, and Libuv use * We're making changes in this file anyways - may as well fix a couple spelling mistakes while here Make sure FD_CLOEXEC carries over in dup * Otherwise the kqueue descriptor should have FD_CLOEXEC, but doesn't and fails in assert_close_on_exec
2023-12-20Correct free_on_exit env var to free_at_exitHParker
2023-12-19Add tool/missing-baseruby.bat, used when BASERUBY not availableJeremy Evans
Previously, the embedded semicolon in BASERUBY if BASERUBY is not available breaks tarball builds without BASERUBY when using OpenBSD make, due to the inability to escape MFLAGS correctly. This moves the same BASERUBY code into a separate file, avoiding the MFLAGS quoting issue. BASERUBY must be passed to build-ext because it is required by ripper since the introduction of lrama. Fixes [Bug #19683] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-12-20Revert "[Bug #19831] Remove duplicate library options"Mikhail Doronin
This reverts commit 5bb946228550c7f171c27725860b153a675404f3. Fixes https://bugs.ruby-lang.org/issues/20072
2023-12-19Support `GC.auto_compact = :empty` on debug buildsPeter Zhu
This commit adds `GC.auto_compact = :empty` which will run auto-compaction sorting pages by empty slots so the most amount of objects will be moved. This will make it easier to write tests for auto-compaction.
2023-12-19[PRISM] Correct the jump target for redo in FOR_NODEMatt Valentine-House
2023-12-19[PRISM] Fix parameter numbering in For NodeMatt Valentine-House
2023-12-19RDoc for ComplexBurdetteLamar
2023-12-20moved object should not have a shape IDKoichi Sasada
fix [Bug #19917]
2023-12-20use `rb_thread_io_blocking_call()` moreKoichi Sasada
use `rb_thread_io_blocking_call()` instead of `rb_thread_io_blocking_region()` more. See https://github.com/ruby/ruby/pull/9178#issuecomment-1858711533
2023-12-20declare `rb_thread_io_blocking_call`Koichi Sasada
2023-12-20setup `waiting_fd` for `thread_sched_wait_events()`Koichi Sasada
`thread_sched_wait_events()` suspend the thread until the target fd is ready. Howver, other threads can close the target fd and suspended thread should be awake. To support it, setup `waiting_fd` before `thread_sched_wait_events()`. `rb_thread_io_wake_pending_closer()` should be called before `RUBY_VM_CHECK_INTS_BLOCKING()` because it can return this function. This patch introduces additional overhead (setup/cleanup `waiting_fd`) and maybe we can reduce the overhead.
2023-12-19Set m_tbl right after allocationPeter Zhu
We should set the m_tbl right after allocation before anything that can trigger GC to avoid clone_p from becoming old and needing to fire write barriers. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2023-12-19Use RICLASS_OWNS_M_TBL_PPeter Zhu
It's more consistent with gc_mark_children.
2023-12-19YJIT: Add stats option to RubyVM::YJIT.enable (#9297)Takashi Kokubun
2023-12-19RDoc for ComplexBurdetteLamar
2023-12-19We need to load builtins so that they workAaron Patterson
Before this commit no methods defined in Ruby were being loaded. For example `class` or `tap` methods would not exist. [ruby-core:115793] [Bug #20073]
2023-12-19Implement IO::Buffer on VWAPeter Zhu
2023-12-19[DOC] remove reference to pre-3.0 splat operator behaviorDoug Orleans
2023-12-19restore the stack pointer on finalizerKoichi Sasada
When error on finalizer, the exception will be ignored. To restart the code, we need to restore the stack pointer. fix [Bug #20042]