72528 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
61c7ae4d27 Gather heap page size conditions combination
When similar combination of conditions are separated in two places, it
is harder to make sure the conditional blocks match each other,
2022-07-07 22:39:59 +09:00
Peter Zhu
f36859869f Improve error message for segv in read_barrier_handler
If the page_body is a null pointer, then read_barrier_handler will
crash with an unrelated message. This commit improves the error message.

Before:

test.rb:1: [BUG] Couldn't unprotect page 0x0000000000000000, errno: Cannot allocate memory

After:

test.rb:1: [BUG] read_barrier_handler: segmentation fault at 0x14
2022-07-07 09:39:28 -04:00
Peter Zhu
d6c98626da Fix crash in compaction due to unlocked page
The page of src could be partially compacted, so it may contain
T_MOVED. Sweeping a page may read objects on this page, so we
need to lock the page.
2022-07-07 09:39:28 -04:00
Peter Zhu
d7c5a6d49b Fix typo in gc_compact_move
The page we're sweeping is on the destination heap `dheap`, not the
source heap `heap`.
2022-07-07 09:39:28 -04:00
卜部昌平
7f64989e5c do not define our own version of memcpy
The (sole) use of memcpy in our public header is now replaced to
directly call ruby_nonempty_memcpy, and the previous definition of
memcpy is now internal-only.  [Bug#18893]
2022-07-07 22:10:53 +09:00
Nobuyoshi Nakada
8794cc6289
Tentatively put macOS CIs back with adding macOS 12 2022-07-07 15:06:10 +09:00
Nobuyoshi Nakada
67e54ce408
Fallback mkdir_p to as_mkdir_p
Assume `mkdir -p` to be race-free on recent systems.
And we do not provide install-sh anyway.
2022-07-07 15:06:10 +09:00
Nobuyoshi Nakada
cd94842922 [Bug #18892] Reset ARGF.lineno after reading shebang 2022-07-07 11:33:07 +09:00
Burdette Lamar
7ba5c0633c [ruby/pstore] Emphasize keys instead of roots, values instead of objects (https://github.com/ruby/pstore/pull/7)
Modifies RDoc to Emphasize keys instead of roots, values instead of objects.

Code:

    Renames method #root? to #key? and method #roots to #keys.
    Aliases method #key as #root and method #keys as #roots.
    Adds testing for all four methods.

https://github.com/ruby/pstore/commit/4436ea0891
2022-07-07 07:05:01 +09:00
Aaron Patterson
4ccaf6285f
fix lldb scripts on older lldb python 2022-07-06 13:21:37 -07:00
Burdette Lamar
dbb23f29cb [ruby/date] [DOC] Enhanced RDoc (https://github.com/ruby/date/pull/57)
All things commercial.

https://github.com/ruby/date/commit/9d3bc61728
2022-07-07 03:58:02 +09:00
Jean Boussier
c6b38e43b0 thread_pthread.c: Remove useless call to pthread_rwlock_init 2022-07-06 19:57:27 +02:00
Noah Gibbs (and/or Benchmark CI)
a2e0815e27 Switch YJIT to using rb_str_buf_append rather than rb_str_append when encodings don't match, as discussed with byroot 2022-07-06 17:25:58 +02:00
Jean Boussier
906f7cb3e7 vm_opt_ltlt: call rb_str_buf_append directly if RHS is a String
`rb_str_concat` does a lot of type checking we can easily bypass.

```

|               |compare-ruby|built-ruby|
|:--------------|-----------:|---------:|
|string_concat  |    362.007k|  398.965k|
|               |           -|     1.10x|
```
2022-07-06 17:25:58 +02:00
git
9641f23316 * 2022-07-07 [ci skip] 2022-07-07 00:13:44 +09:00
Maxime Chevalier-Boisvert
3c61e1e77f
YJIT: add a counter for gc object refs in the machine code (#6089)
Add a counter for gc object refs in the machine code

This is to gather data for the eventual implementation of
a constant pool.
2022-07-06 11:13:22 -04:00
Nobuyoshi Nakada
5ef3c7ea2d
[Bug #18898] Fallback invalid external encoding to the default 2022-07-06 18:08:31 +09:00
git
53afacd036 Update bundled gems list at 2022-07-06 2022-07-06 07:03:41 +00:00
Yuta Saito
76619bbb11 [wasm] get rid of workaround use of older binaryen and update to latest
We no longer need to use older version of binaryen since the blocker
issue has been resolved https://github.com/WebAssembly/binaryen/issues/4401
2022-07-06 11:59:38 +09:00
Nobuyoshi Nakada
eaeb130b11 [Bug #18890] newline should be insignificant after pattern label 2022-07-06 08:32:36 +09:00
Brian Le
902d1a5c51 [rubygems/rubygems] add message when gems are requested to be updated but they are not installed
https://github.com/rubygems/rubygems/commit/27953ffe9a
2022-07-06 02:59:14 +09:00
Brian Le
6eab8095fa [rubygems/rubygems] output gems already up-to-date regardless if any gems were updated
https://github.com/rubygems/rubygems/commit/4ec608a573
2022-07-06 02:59:13 +09:00
Nobuyoshi Nakada
f681f9ae24
Adjust indents [ci skip] 2022-07-06 00:45:06 +09:00
Nobuyoshi Nakada
d4f5c01262
Set SDKROOT to empty value [ci skip]
So `RbConfig::CONFIG["includedir"]` does not start with double slash.
2022-07-06 00:32:26 +09:00
git
c21965b2f8 * 2022-07-06 [ci skip] 2022-07-06 00:23:13 +09:00
Nobuyoshi Nakada
68c1a03f9d
Suppress msys2 pathname conversion also at single test runs [ci skip] 2022-07-06 00:22:32 +09:00
Nobuyoshi Nakada
5921bfc7ce
Add --stdout-on-failure, the reverse of --stderr-on-failure 2022-07-05 14:40:19 +09:00
Nobuyoshi Nakada
1b34bd07c1
Separate failed output option
It is unrelated to `GlobOption` at all.
2022-07-05 14:40:19 +09:00
Nobuyoshi Nakada
babdb158d1
Synchronize the test thread not to die before assertions 2022-07-05 13:50:45 +09:00
Nobuyoshi Nakada
3a9ff9457a
CI: skip the failing test only 2022-07-05 11:35:14 +09:00
Nobuyoshi Nakada
b5f871888e
CI: skip objspace test on MinGW for now 2022-07-05 11:33:47 +09:00
dependabot[bot]
ed76ba35dd [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.15 to 0.9.18.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.15...v0.9.18)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

https://github.com/rubygems/rubygems/commit/a862203683
2022-07-05 09:45:42 +09:00
dependabot[bot]
94aff13f88 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.15 to 0.9.18.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.15...v0.9.18)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

https://github.com/rubygems/rubygems/commit/db8486a61e
2022-07-05 09:45:03 +09:00
Nobuyoshi Nakada
a070d4cceb
Local functions should be static 2022-07-05 09:30:05 +09:00
Burdette Lamar
f64bb67d75 [ruby/date] Update ext/date/date_core.c
https://github.com/ruby/date/commit/8eb1c780fb

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2022-07-05 04:12:50 +09:00
BurdetteLamar
5fe86666a5 [ruby/date] Enhanced RDoc
https://github.com/ruby/date/commit/e36690f70e
2022-07-05 04:12:49 +09:00
BurdetteLamar
e323d8e6a2 [ruby/date] Enhanced RDoc
https://github.com/ruby/date/commit/dcc0742623
2022-07-05 04:12:48 +09:00
BurdetteLamar
6317cf7de8 [ruby/date] Enhanced RDoc
https://github.com/ruby/date/commit/91c632f156
2022-07-05 04:12:48 +09:00
BurdetteLamar
7212163e7c [ruby/date] Enhanced RDoc
https://github.com/ruby/date/commit/5c18ec031e
2022-07-05 04:12:47 +09:00
BurdetteLamar
4ec14b6323 [ruby/date] Enhanced RDoc
https://github.com/ruby/date/commit/fd3ae275c3
2022-07-05 04:12:46 +09:00
BurdetteLamar
24c80aea0e [ruby/date] Enhanced RDoc
https://github.com/ruby/date/commit/ac25182c66
2022-07-05 04:12:45 +09:00
BurdetteLamar
c90110d146 [ruby/date] Enhanced RDoc
https://github.com/ruby/date/commit/f9ecaad2ee
2022-07-05 04:12:44 +09:00
BurdetteLamar
6324aaf3d0 [ruby/date] Enhanced RDoc
https://github.com/ruby/date/commit/e80fee4f30
2022-07-05 04:12:43 +09:00
git
89b3133a3a * 2022-07-05 [ci skip] 2022-07-05 03:05:19 +09:00
Jean Boussier
890df5f812 ObjectSpace.dump: Include string coderange
I suspect that some shared pages are invalidated because
some static string don't have their coderange set eagerly.

So the first time they are scanned, the entire memory page is
invalidated.

Being able to see the coderange in `ObjectSpace` would help debug
this.

And in addition `dump` currently call `is_broken_string()`  and `is_ascii_string()`
which both end up scanning the string and assigning coderange. I think it's
undesirable as `dump` should be read only.
2022-07-04 20:04:59 +02:00
git
b92fb78696 Update bundled gems list at 2022-07-04 2022-07-04 07:03:51 +00:00
git
1c3dc0877a * 2022-07-04 [ci skip] 2022-07-04 01:44:00 +09:00
Jeremy Evans
fe6245b430 Fix rb_fix_mul_fix on OpenBSD/mips64
This fixes invalid and inconsistent results for the Fixnum*Fixnum case
where the result of the multiplication does not fit in 64-bit
on OpenBSD/mips64.  For example:

  $  for x in 1 23; do ruby31 -e 'p(54306000000000*86400)'; done
  14409380628474329524
  11410664325873689790

Cases where an argument was Bignum, as well as cases where the result
of the multiplication fits in 64-bit are fine:

  $ for x in 1 23; do ruby31 -e 'p(54306000*86400)'; done
  4692038400000
  4692038400000

  $ for x in 1 23; do ruby31 -e 'p(5430600000000000000000*86400)'; done
  469203840000000000000000000
  469203840000000000000000000

This was originally discovered by running the tests for the openssl gem
on OpenBSD/mips64 and having one test fail for a date far in the future.
I eventually traced this to the generic multiplication issue.

The underlying cause is using the int128_t type. This avoids use of the
int128_t type in this case, falling back to the slower conversion code,
which in the overflow case, turns the Fixnums into Bignums, then
performs the multiplication.
2022-07-03 09:42:44 -07:00
git
cd34f56d45 * 2022-07-03 [ci skip] 2022-07-03 00:07:26 +09:00
Nobuyoshi Nakada
06a241ad28
Disable USE_DEBUG_COUNTER test for now [ci skip] 2022-07-03 00:07:06 +09:00