| Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12202
|
|
When loading a crafted marshal data of Random, a pointer to an illegal
address was created. I don't think there is any harm since the data is
normalized before access, but just to be safe, I add a check to make it
an error.
Notes:
Merged: https://github.com/ruby/ruby/pull/12200
|
|
|
|
.git-blame-ignore-revs will be updated after this commit is merged.
Notes:
Merged: https://github.com/ruby/ruby/pull/12184
|
|
https://github.com/rubygems/rubygems/commit/23d06195fa
|
|
|
|
(https://github.com/ruby/reline/pull/786)
https://github.com/ruby/reline/commit/d4f6741e7e
|
|
With https://github.com/ruby/ruby/pull/12156,
the memory of the `struct fast_fallback_getaddrinfo_shared`
is now allocated even if there is only one address family.
This change will always free it when `TCPSocket.new` finishes.
Notes:
Merged-By: shioimm <shioi.mm@gmail.com>
|
|
This is not important because of the path of `assert(false)`, but just
in case.
Coverity Scan found this issue.
https://github.com/ruby/prism/commit/7335c62f9d
|
|
(https://github.com/ruby/rdoc/pull/1212)
Currently, the gemspec's files are defined by hand, which is error-prone.
For example: https://github.com/ruby/rdoc/pull/1211
This commit uses `Dir.glob` where possible to reduce the risk of that
happening again.
- Additional files added with this approach:
```
# This should have been added by only captured by this commit
lib/rdoc/parser/prism_ruby.rb
# These are folders and can be included/ignored either way
lib/rdoc/generator/template/darkfish
lib/rdoc/generator/template/darkfish/css
lib/rdoc/generator/template/darkfish/fonts
lib/rdoc/generator/template/darkfish/images
lib/rdoc/generator/template/darkfish/js
lib/rdoc/generator/template/json_index
lib/rdoc/generator/template/json_index/js
```
- Files that are ignored after this change:
```
# They make no difference on documentation generation
# Probably can be removed
lib/rdoc/generator/template/darkfish/.document
lib/rdoc/generator/template/json_index/.document
```
https://github.com/ruby/rdoc/commit/ac2a151f10
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12198
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12198
|
|
follow up: https://github.com/ruby/ruby/pull/12196/files#r1861730753
Notes:
Merged: https://github.com/ruby/ruby/pull/12197
|
|
from backtraces.
Notes:
Merged: https://github.com/ruby/ruby/pull/12196
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12196
|
|
After any `LINK_ELEMENT` sequence is added, `LINK_ANCHOR` must not
loop.
Notes:
Merged: https://github.com/ruby/ruby/pull/12195
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12193
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12193
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12193
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12193
|
|
A follow-up to ef59175a68c448fe334125824b477a9e1d5629bc. That commit
uses `&body->local_table[...]` but `body->local_table` is already freed.
I think it is an undefined behavior to calculate a pointer that exceeds
the bound by more than 1.
This change moves the free of `body->local_table` after the calculation.
Coverity Scan found this issue.
Notes:
Merged: https://github.com/ruby/ruby/pull/12194
|
|
The same issue as https://github.com/ruby/prism/pull/3246
Coverity Scan found this issue.
Notes:
Merged: https://github.com/ruby/ruby/pull/12192
|
|
|
|
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/12187
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12187
|
|
|
|
When mmap fails for any reason, the fd must be closed.
Coverity Scan found this issue.
https://github.com/ruby/prism/commit/c06e9c400f
|
|
fill_lines is passed -1 for offset, which causes it to read the -1 index
of traces. This is not valid memory as -1 is reading before the trace
global variable in rb_print_backtrace. This code comes from commit
99d1f5f88b9b6de3124e31019902f91e030d334f, where there used to be special
handling for the -1 index.
We can see this error in ASAN:
==71037==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00010157abf8 at pc 0x00010116f3b8 bp 0x00016f92c3b0 sp 0x00016f92c3a8
READ of size 8 at 0x00010157abf8 thread T0
#0 0x10116f3b4 in debug_info_read addr2line.c:1945
#1 0x10116cc90 in fill_lines addr2line.c:2497
#2 0x101169dbc in rb_dump_backtrace_with_lines addr2line.c:2635
#3 0x100e56788 in rb_print_backtrace vm_dump.c:825
#4 0x100e56db4 in rb_vm_bugreport vm_dump.c:1155
#5 0x100734dc4 in rb_bug_without_die error.c:1085
#6 0x100734ae4 in rb_bug error.c:109
Notes:
Merged: https://github.com/ruby/ruby/pull/12185
|
|
(https://github.com/ruby/reline/pull/785)
https://github.com/ruby/reline/commit/85e20f0031
|
|
(https://github.com/ruby/reline/pull/784)
https://github.com/ruby/reline/commit/a6d1ac54e6
|
|
macOS clang 16 generates DWARF5, which have Mach-O section names that
are limited to 16 characters, which causes sections with long names to
be truncated and not match above.
See: https://wiki.dwarfstd.org/Best_Practices.md#Mach-2d-O
Notes:
Merged: https://github.com/ruby/ruby/pull/12182
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12178
|
|
It's not used outside of error.c.
Notes:
Merged: https://github.com/ruby/ruby/pull/12183
|
|
GCC 13 prints the following warning.
https://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20241127T001003Z.log.html.gz
```
compiling generator.c
generator.c: In function ‘raise_generator_error’:
generator.c:91:5: warning: function ‘raise_generator_error’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
91 | VALUE str = rb_vsprintf(fmt, args);
| ^~~~~
```
This change prevents the warning by specifying the format attribute.
https://github.com/ruby/json/commit/b8c1490846
|
|
While profiling `strscan`, I noticed `rb_must_asciicompat` was quite
slow, as more than 5% of the benchmark was spent in it: https://share.firefox.dev/49bOcTn
By checking for the common 3 ASCII compatible encoding index first,
we can skip a lot of expensive operations in the happy path.
Notes:
Merged: https://github.com/ruby/ruby/pull/12180
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12179
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12179
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12179
|
|
testing csv and rexml
Notes:
Merged: https://github.com/ruby/ruby/pull/12179
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12179
|
|
Possible fix for recent crashes seen on CI.
[BUG] rb_sys_fail_str(<STDIN>) - errno == 0
rb_io_path() calls rb_obj_dup(), which could call initialize_dup in Ruby
and clobber errno before rb_sys_fail_str() gets to read errno. So
save it out first.
(Using separate statements because order of evaluation in function call
list is unspecified, and order is important here.)
https://github.com/ruby/io-console/commit/0ba400b5e7
|
|
This reverts commit 5bd144c1bb20e22e4d9f5e5e0264820fd3ef8137.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12176
|
|
(https://github.com/ruby/strscan/pull/115)
Fix: https://github.com/ruby/strscan/issues/113
This allows to directly parse an Integer from a String without needing
to first allocate a sub string.
Notes:
The implementation is limited by design, it's meant as a first step,
only the most straightforward, based 10 integers are supported.
https://github.com/ruby/strscan/commit/6a3c74b4c8
|
|
(https://github.com/ruby/strscan/pull/111)
# Why?
To improve the parsing process, I would like to add benchmarks for all
parsing processes.
## scan
- scan_full(regexp, false, true) == StringScanner#check
- scan_full(regexp, false, false) == StringScanner#match?
### CRuby
```
$ benchmark-driver benchmark/scan.yaml
Warming up --------------------------------------
check(reg) 10.558M i/s - 10.848M times in 1.027445s (94.71ns/i)
check(str) 13.368M i/s - 13.782M times in 1.030978s (74.80ns/i)
match?(reg) 16.080M i/s - 16.247M times in 1.010340s (62.19ns/i)
match?(str) 23.336M i/s - 23.501M times in 1.007088s (42.85ns/i)
Calculating -------------------------------------
check(reg) 11.601M i/s - 31.675M times in 2.730287s (86.20ns/i)
check(str) 15.217M i/s - 40.104M times in 2.635475s (65.72ns/i)
match?(reg) 18.781M i/s - 48.241M times in 2.568662s (53.25ns/i)
match?(str) 29.441M i/s - 70.007M times in 2.377840s (33.97ns/i)
Comparison:
match?(str): 29441324.5 i/s
match?(reg): 18780543.7 i/s - 1.57x slower
check(str): 15217130.1 i/s - 1.93x slower
check(reg): 11601371.2 i/s - 2.54x slower
```
### JRuby
```
$ benchmark-driver benchmark/scan.yaml
Warming up --------------------------------------
check(reg) 8.129M i/s - 8.090M times in 0.995222s (123.02ns/i)
check(str) 16.691M i/s - 16.616M times in 0.995519s (59.91ns/i)
match?(reg) 8.979M i/s - 9.001M times in 1.002440s (111.37ns/i)
match?(str) 26.138M i/s - 26.011M times in 0.995150s (38.26ns/i)
Calculating -------------------------------------
check(reg) 11.808M i/s - 24.387M times in 2.065238s (84.69ns/i)
check(str) 31.762M i/s - 50.072M times in 1.576495s (31.48ns/i)
match?(reg) 13.944M i/s - 26.936M times in 1.931719s (71.71ns/i)
match?(str) 50.872M i/s - 78.414M times in 1.541392s (19.66ns/i)
Comparison:
match?(str): 50872250.2 i/s
check(str): 31761544.3 i/s - 1.60x slower
match?(reg): 13944219.6 i/s - 3.65x slower
check(reg): 11808244.1 i/s - 4.31x slower
```
## search
- search_full(regexp, false, true) == StringScanner#check_until
- search_full(regexp, false, false) == StringScanner#exist?
```
$ benchmark-driver benchmark/search.yaml
Warming up --------------------------------------
check_until(reg) 9.338M i/s - 9.456M times in 1.012573s (107.09ns/i)
check_until(str) 11.385M i/s - 11.979M times in 1.052173s (87.83ns/i)
exist?(reg) 13.416M i/s - 13.517M times in 1.007532s (74.54ns/i)
exist?(str) 17.976M i/s - 18.677M times in 1.038981s (55.63ns/i)
Calculating -------------------------------------
check_until(reg) 10.297M i/s - 28.015M times in 2.720634s (97.11ns/i)
check_until(str) 12.684M i/s - 34.156M times in 2.692853s (78.84ns/i)
exist?(reg) 15.184M i/s - 40.249M times in 2.650786s (65.86ns/i)
exist?(str) 21.426M i/s - 53.928M times in 2.517008s (46.67ns/i)
Comparison:
exist?(str): 21425527.1 i/s
exist?(reg): 15183679.9 i/s - 1.41x slower
check_until(str): 12684053.7 i/s - 1.69x slower
check_until(reg): 10297134.8 i/s - 2.08x slower
```
### JRuby
```
$ benchmark-driver benchmark/search.yaml
Warming up --------------------------------------
check_until(reg) 7.646M i/s - 7.649M times in 1.000381s (130.78ns/i)
check_until(str) 13.075M i/s - 13.010M times in 0.995048s (76.48ns/i)
exist?(reg) 8.728M i/s - 8.684M times in 0.994921s (114.57ns/i)
exist?(str) 20.609M i/s - 20.514M times in 0.995399s (48.52ns/i)
Calculating -------------------------------------
check_until(reg) 9.371M i/s - 22.939M times in 2.447900s (106.71ns/i)
check_until(str) 22.760M i/s - 39.225M times in 1.723414s (43.94ns/i)
exist?(reg) 11.758M i/s - 26.185M times in 2.226997s (85.05ns/i)
exist?(str) 34.564M i/s - 61.827M times in 1.788749s (28.93ns/i)
Comparison:
exist?(str): 34564306.2 i/s
check_until(str): 22759878.4 i/s - 1.52x slower
exist?(reg): 11757927.4 i/s - 2.94x slower
check_until(reg): 9371009.3 i/s - 3.69x slower
```
https://github.com/ruby/strscan/commit/81a80a176b
|
|
ruby-{name}, recommend those.
https://github.com/rubygems/rubygems/commit/d7d33172c1
|
|
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
The sync script defaults to `master` when analysing which commits to
pick, but the default for new repos now is `main`.
Notes:
Merged: https://github.com/ruby/ruby/pull/12174
|