| Age | Commit message (Collapse) | Author |
|
|
|
[Bug #22002] Never pop when compiling branch predicate
The value is always needed. Now prism emits the same instructions as parse.y for the added test case.
`defined?`/`flip-flop` caused `argument stack underflow`, `and`/`or` segfaulted during runtime.
|
|
[Bug #22003] Refactor template/configure-ext.mk.tmpl
- Select extension library directories by globbing extconf.rb.
- Exclude extensions for test before uniquifing bundled gems.
- Use `Dir.glob` base option to remove prefixed srcdir.
|
|
c0d86a0103de7130943d54b4a290b76ec7e0c135,47e061277ac194a36659510bcf4f3190bde629a6: [Backport #21952]
class.c: rb_class_duplicate_classext also dup content of cvc_tbl
[Bug #21952]
Shallow copying the table result in the same memory being shared
between multiple box, causing double free when one of the box
is garbage collected.
---
class.c: Make cvc_tbl a managed object
[Bug #21952]
Solves the double-free or use after-free concern with boxes.
Now entries can safely be used for copy-on-write.
Also is likely necessary to make it save to read cvar from
secondary ractors, as allowed since: ab32c0e690b805cdaaf264ad4c3421696c588204
|
|
[PATCH] [Bug #22004] Fix short-circuited loop conditions
|
|
[PATCH] Mark `$_` as box-dynamic to bypass Box gvar_tbl cache
`$_` is updated through svar (rb_lastline_set), bypassing
rb_gvar_set, so the Box gvar_tbl cache is never invalidated
and returns a stale value. Call rb_gvar_box_dynamic so
gvar_use_box_tbl() skips the cache.
Fixes [Bug #21940](https://bugs.ruby-lang.org/issues/21940)
|
|
8ad6baa01746e8de0460f0ccdaee69953a70af17: [Backport #21933]
[PATCH] Fix Box regexp match vars after non-match
[PATCH] Use box_ready for $&, $`, $\', $+
These variables have rb_gvar_readonly_setter, so box_ready is sufficient.
Only $~ needs box_dynamic due to its custom match_setter.
|
|
[PATCH] [Bug #21986] Fix location of numeric literal
When checking for suffixes, do not flush the numeric literal token
even if no suffix is found.
|
|
[PATCH] [Bug #21985] Include the `-` in the negative numbers location
|
|
Caught by wbcheck. The same field is written with RB_OBJ_WRITE
in rb_method_definition_set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Bug #22018]
ISeq returned by `RubyVM::InstructionSequene.load_iseq` weren't
handled by the coverage module.
|
|
|
|
Extends the @_init guard to def_method so that an ERB object created
via Marshal.load (which bypasses initialize) raises ArgumentError
instead of evaluating arbitrary source. def_module and def_class both
delegate to def_method and are covered by the same check.
Co-authored-by: Tristan Madani <TristanInSec@gmail.com>
|
|
[Bug #21992]
When redefining `BasicObject#initialize` there's no super class to
access.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b6e6ccc6c22ebb464ce101e42a14e7daea2a80b6, cbca59377ebfa1bc1183322fa9d9d0067d445c24: [Backport #21844]
[ruby/psych] Remove excessive check of message
Make `Data#initialize` reject `Integer` keys
[Bug #21844] Fix error message
|
|
[ruby/rubygems] Fix NoMethodError in Gem.try_activate when activation conflicts occur
|
|
reinit rb_internal_thread_event_hooks_rw_lock at fork
|
|
marshal.c: properly freeze linked strings
|
|
Fix regexp performance regression for patterns starting with s/k
|
|
|
|
[Bug #21964]
|
|
Currently we maintain the subclasses list for two separate purposes (we essentially have to different relationships we're putting into the same list):
1. On a T_MODULE, we track the T_ICLASSes created to include it into
other classes. Used for method invalidation and propagating includes
on the module that happen after it's been used
2. On a T_CLASS/T_ICLASS, we track the T_CLASS/T_ICLASS which are the
immediate children of the class. We use this for method invalidation,
some cvar things, and to iterate through subclasses.
Purpose 1 does not have any issues with box, the T_ICLASS always belongs
to one specific module and that's immutable. This list can be box-global
(always use the prime classext or hoist it out) and only needs to be
pruned during free. If we care about behaviour under a particular box
(ie. the propagating includes), we should look up the current box being
modified on the ICLASS itself.
Purpose 2 is more complicated. It currently tracks the immediate
children, the T_CLASS or T_ICLASS whose super points back. Because super
is per-box and is mutable (include/prepend insert ICLASSes into the
chain) we need to update the list on include/prepend, entries must be
per-box, and we can have multiple entries per-box. *I propose we
simplify this by no longer tracking the immediate subclass*, but instead
tracking the T_CLASS -> ... -> T_CLASS relationship, ie. the inverse of
rb_class_superclass. That relationship is the same across all boxes and
immutable after Class creation.
As a special case the ICLASS for refinements are also added to the
purpose 2 list (on T_CLASS). As those ICLASS do not chain to an eventual
leaf T_CLASS.
When we need to find the classes which have included a module, we can
use the module subclasses list to find the ICLASS and then use
RCLASS_INCLUDER. If we needed to iterate all T_ICLASS, we could then
walk up the CLASS_SUPER chain, but I didn't find anywhere we needed to
do that.
|
|
[Bug #21955]
|
|
|
|
|
|
|
|
Change rescue modifier binding power from PM_BINDING_POWER_COMPOSITION
to PM_BINDING_POWER_MATCH + 1, so that `x = a rescue b in c` is parsed
as `(x = (a rescue b)) in c` and `def f = a rescue b in c` is parsed
as `(def f = (a rescue b)) in c`.
https://github.com/ruby/prism/commit/7e797f59ae
|
|
Fix ultra_safe mode of pstore bundled with Ruby 4.0.
|
|
Fix race condition right after ubf registration
Fixes [Bug #21926]
|
|
[ruby/timeout] Compatibility with Fiber scheduler.
(https://github.com/ruby/timeout/pull/97)
[Bug #21947]
|
|
[Bug #21945] Correctly handle `and?` and similar
|
|
[PATCH] [Bug #21917] Fix build on AIX
|
|
exceptional entry
[Backport #21941]
In case of `--yjit-disable`, YJIT only starts to record environment
escapes after `RubyVM::YJIT.enable`. Previously we falsely assumed that
we always have a full history all the way back to VM boot. This had YJIT
install and run code that assume EP=BP when EP≠BP for some exceptional
entry into the middle of a running frame, if the environment escaped
before `YJIT.enable`.
The fix is to reject exceptional entry with an escaped environment.
Rename things and explain in more detail how the predicate for deciding
to assume EP=BP works. It's quite subtle since it reasons about all
parties in the system that push a control frame and then run JIT code.
Note that while can_assume_on_stack_env() checks the currently running
environment if it so happens to be the one YJIT is compiling against, it
can return true for any ISEQ. The check isn't necessary for fixing the
bug, and the load bearing part of this patch is the change to
exceptional entries.
This fix is flat on speed and space on ruby-bench headline benchmarks.
Many thanks for the community effort to create a small test case for
this bug.
|
|
It appears that shims for individual commands are no longer being
created.
|
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
OpenBSD requires MAP_STACK for memory regions used as thread stacks.
However it seems to error with "Invalid argument" unless the permissions
include both PROT_READ | PROT_WRITE.
We should be able to satisft this by re-mmapping over our reserved stack
region to get the MAP_STACK flag. As a (very minor) bonus, this applies
MAP_STACK only to the machine stack region, not the VM region.
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
|
|
|