| Age | Commit message (Collapse) | Author |
|
|
|
Since `rb_bug` does not always take Ruby frame info during SEGV, the
source file path may not be output.
```
1) Failure:
TestRubyOptions#test_crash_report_script [/tmp/ruby/src/trunk_gcc11/test/ruby/test_rubyoptions.rb:907]:
Expected /
bug\.rb:(?:1:)?\s\[BUG\]\sSegmentation\sfault.*\n
/x
to match
"[BUG] Segmentation fault at 0x000003e900328766\n"+
```
http://ci.rvm.jp/results/trunk_gcc11@ruby-sp2-noble-docker/5663880
|
|
[Bug #21029]
Notes:
Merged: https://github.com/ruby/ruby/pull/12949
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12947
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12798
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12889
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12946
|
|
Infinite ranges, i.e. unbounded ranges, should overlap with any other range
which wasn't the case in the following example: (0..3).overlap?(nil..nil)
Notes:
Merged: https://github.com/ruby/ruby/pull/12937
|
|
[Misc #21143]
Conceptually this makes sense and is more consistent with using
the `Name = Class.new(Superclass)` alternative method.
However the new class is still named before `inherited` is called.
Notes:
Merged: https://github.com/ruby/ruby/pull/12927
|
|
Previously, live range of `ast_value` ended on the call right before
rb_ast_dispose(), which led to premature collection and use-after-free.
We observed this crashing on -O3, -DVM_CHECK_MODE, with GCC 11.4.0 on
Ubuntu.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/12898
|
|
The code between the two ObjectSpace.count_objects could trigger a GC,
which could free string objects causing this test to fail.
We can see this failure on CI http://ci.rvm.jp/results/trunk-random2@ruby-sp2-noble-docker/5651016
TestHashOnly#test_AREF_fstring_key [test/ruby/test_hash.rb:1991]:
<197483> expected but was
<129689>.
Notes:
Merged: https://github.com/ruby/ruby/pull/12916
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12914
|
|
https://github.com/ruby/ruby/pull/12801 changed regexp matches to reuse
the backref, which causes memory to leak if the original registers of the
match is not freed.
For example, the following script leaks memory:
10.times do
1_000_000.times do
"aaaaaaaaaaa".gsub(/a/, "")
end
puts `ps -o rss= -p #{$$}`
end
Before:
774256
1535152
2297360
3059280
3821296
4583552
5160304
5091456
5114256
4980192
After:
12480
11440
11696
11632
11632
11760
11824
11824
11824
11888
Notes:
Merged: https://github.com/ruby/ruby/pull/12905
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12901
|
|
The test could flake because a major GC could be triggered due to allocation
for caches or other things, which would cause the test to fail.
|
|
The test fails sometimes with:
TestGc#test_latest_gc_info_weak_references_count [test/ruby/test_gc.rb:421]:
Expected 2 to be <= 1.
Notes:
Merged: https://github.com/ruby/ruby/pull/12894
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e "class A < B; end"
@ ProgramNode (location: (1,0)-(1,16))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,16))
+-- body: (length: 1)
+-- @ ClassNode (location: (1,0)-(1,16))
+-- locals: []
+-- class_keyword_loc: (1,0)-(1,5) = "class"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- constant_path:
| @ ConstantReadNode (location: (1,6)-(1,7))
| +-- name: :A
+-- inheritance_operator_loc: (1,8)-(1,9) = "<"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- superclass:
| @ ConstantReadNode (location: (1,10)-(1,11))
| +-- name: :B
+-- body: nil
+-- end_keyword_loc: (1,13)-(1,16) = "end"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- name: :A
```
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12879
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12878
|
|
TestSetTraceFunc#test_tracepoint_disable is a flaky and failing intermittently. Here is an example of failure logs.
```
1) Failure:
TestSetTraceFunc#test_tracepoint_disable [/home/runner/work/ruby/ruby/src/test/ruby/test_settracefunc.rb:857]:
<[:foo, :disable, :foo, :disable]> expected but was
<[:call, :call, :foo, :disable, :foo, :disable]>.
```
https://github.com/ruby/ruby/actions/runs/13619175633/job/38066208546?pr=12585#step:12:875
I printed values of TracePoint objects as follows, and checked the values when failing intermittently.
https://github.com/ruby/ruby/blob/7f9a6fc582fb5cfd88ab73a61782f39894a37ba6/test/ruby/test_settracefunc.rb#L848
Here is the log when the TestSetTraceFunc#test_tracepoint_disable failed intermittently.
`2025-03-05T09:08:37.4075411Z e: call, f: /home/runner/work/ruby/ruby/src/lib/tempfile.rb, l: 386, i: call, d: Tempfile::FinalizerManager` is an unexpected events. Thus, I modified test code so that we can filter out unexpected trace events.
```
2025-03-05T09:08:37.4075411Z e: call, f: /home/runner/work/ruby/ruby/src/lib/tempfile.rb, l: 386, i: call, d: Tempfile::FinalizerManager
2025-03-05T09:08:37.4085009Z e: call, f: /home/runner/work/ruby/ruby/src/test/ruby/test_settracefunc.rb, l: 808, i: foo, d: TestSetTraceFunc
2025-03-05T09:08:37.4086042Z e: call, f: <internal:trace_point>, l: 295, i: disable, d: TracePoint
2025-03-05T09:08:37.4115693Z e: call, f: /home/runner/work/ruby/ruby/src/test/ruby/test_settracefunc.rb, l: 808, i: foo, d: TestSetTraceFunc
2025-03-05T09:08:37.4116734Z e: call, f: <internal:trace_point>, l: 295, i: disable, d: TracePoint
```
Notes:
Merged-By: ono-max <onoto1998@gmail.com>
|
|
[Bug #21170]
st_table reserves -1 as a special hash value to indicate that an entry
has been deleted. So that that's a valid value to be returned from the
hash function, do_hash replaces -1 with 0 so that it is not mistaken for
the sentinel.
Previously, when upgrading an AR table to an ST table,
rb_st_add_direct_with_hash was used which did not perform the same
conversion, this could lead to a hash in a broken state where one if its
entries which was supposed to exist being marked as a tombstone.
The hash could then become further corrupted when the ST table required
resizing as the falsely tombstoned entry would be skipped but it would
be counted in num entries, leading to an uninitialized entry at index
15.
In most cases this will be really rare, unless using a very poorly
implemented custom hash function.
This also adds two debug assertions, one that st_add_direct_with_hash
does not receive the reserved hash value, and a second in
rebuild_table_with, which ensures that after we rebuild/compact a table
it contains the expected number of elements.
Co-authored-by: Alan Wu <alanwu@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/12852
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12837
|
|
Fix: https://github.com/ruby/spec/issues/1249
JRuby and TruffleRuby can't implement this behavior.
While quite a lot of code out there relies on it, if it's
not implemented it will simply result in sligthly less efficient
code, so not the end of the world.
Notes:
Merged: https://github.com/ruby/ruby/pull/12850
|
|
`YJIT.enable()` (#12505)
* first commit
* yjit.rb change
* revert formatting
* rename mem-size to exec-mem-size for correctness
* wip, move setting into rb_yjit_enable directly
* remove unused helper functions
* add in call threshold
* input validation with extensive eprintln
* delete test script
* exec-mem-size -> mem-size
* handle input validation with asserts
* add test cases related to input validation
* modify test cases
* move validation out of rs, into rb
* add comments
* remove trailing spaces
* remove logging
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
* remove helper fn
* Update test/ruby/test_yjit.rb
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
* trailing white space
---------
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
The following Location information has been added This is the information required for parse.y to be a universal parser:
```
❯ ruby --parser=prism --dump=parsetree -e "END { }"
@ ProgramNode (location: (1,0)-(1,8))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,8))
+-- body: (length: 1)
+-- @ PostExecutionNode (location: (1,0)-(1,8))
+-- statements: nil
+-- keyword_loc: (1,0)-(1,3) = "END"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- opening_loc: (1,4)-(1,5) = "{"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-- closing_loc: (1,7)-(1,8) = "}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
|
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/12787
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12787
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12819
|
|
It was defined in `arg` only; moved that pattern to `op_asgn` rule to
share it with `command_asgn`.
|
|
Otherwise, changes to the buffer by the destination write method
could result in data changing for supposedly independent strings.
Fixes [Bug #21131]
Notes:
Merged: https://github.com/ruby/ruby/pull/12771
|
|
|
|
We should skip reference updating for entries in too complex generic ivars
that are special constants. This fixes the following crash:
MAX_SHAPES = 0x80000
MAX_SHAPES.times do |i|
o = []
o.instance_variable_set(:"@foo#{i}", 1)
end
o = []
o.instance_variable_set(:"@a", 123)
GC.compact
Notes:
Merged: https://github.com/ruby/ruby/pull/12781
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12746
|
|
The instruction counter is slowing multi-Ractor applications. I had
changed it to use a thread local, but using a thread local is slowing
single threaded applications. This commit only enables the instruction
counter in YJIT stats builds until we can figure out a way to gather the
information with lower overhead.
Co-authored-by: Randy Stauner <randy.stauner@shopify.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/12670
|
|
Previously, Ruby displayed backtraces for each thread on deadlock. However, it has not been shown since Ruby 3.0.
It should display the backtrace for debugging.
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Notes:
Merged-By: pocke <p.ck.t22@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12740
|
|
sometimes.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12706
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12690
|
|
Forwarding argument is optimized not to packed when no other arguments
and an internal object refers values before it. This size is decided
at called time, calculate the local variable index from the fixed end
point.
Notes:
Merged: https://github.com/ruby/ruby/pull/12686
|
|
|
|
`rb_print_undef` with `target_klass` as argument.
Notes:
Merged: https://github.com/ruby/ruby/pull/12665
|
|
Use `assert_raise_kind_of` instead of `assert_raise`, that rejects sub
classes of the given exceptions.
Notes:
Merged: https://github.com/ruby/ruby/pull/12626
|
|
The list of errors cited in 58bc97628c14933b73f13e0856d1a56e70e8b0e4
is not exhaustive and other errors may be raised by `getgrnam`.
Additionally, these errors are system dependent and may not be listed
on all platforms.
Notes:
Merged: https://github.com/ruby/ruby/pull/12610
|
|
Due to the x64 emulation of Windows 11 on ARM the environment variable PROCESSOR_ARCHITECTURE is set by the process startup code.
It must therefore be excluded from tests.
Otherwise tests fail like so:
```
[30585/32394] TestProcess#test_execopts_unsetenv_others = 0.10 s
16) Failure:
TestProcess#test_execopts_unsetenv_others [C:/Users/Lars/ruby/test/ruby/test_process.rb:446]:
<""> expected but was
<"PROCESSOR_ARCHITECTURE=ARM64\n">.
[30616/32394] TestProcess#test_execopts_env = 0.16 s
17) Failure:
TestProcess#test_execopts_env [C:/Users/Lars/ruby/test/ruby/test_process.rb:326]:
<"PATH\n"> expected but was
<"PATH\n" + "PROCESSOR_ARCHITECTURE\n">.
```
Notes:
Merged: https://github.com/ruby/ruby/pull/12581
|
|
Fixes [Bug #21031]
Notes:
Merged: https://github.com/ruby/ruby/pull/12575
|
|
[Bug #20955]
|
|
Have this for lead parameters as well as parameters after rest ("post").
[Bug #20974]
Notes:
Merged: https://github.com/ruby/ruby/pull/12547
|
|
When the end points of an inclusive range equal, `Range#step` should
yields the element once.
Notes:
Merged: https://github.com/ruby/ruby/pull/12559
|