summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-11-10Fix sign-conversion warnings on IL32 platformsNobuyoshi Nakada
If `long` and `int` are the same size, `unsigned int` max would exceed `signed long` range. It is guaranteed by `RB_POSFIXABLE` that `v` can be casted to `long` safely here. Notes: Merged: https://github.com/ruby/ruby/pull/12045
2024-11-10Make `MUNICODE_FLAG` simply expandedNobuyoshi Nakada
It is not expected that `target_os` will change going forward.
2024-11-09[Bug #20800] Use config target for bin directory as-isNobuyoshi Nakada
The "target" in `RbConfig::CONFIG` is being changed from config.sub to align to the system `uname`. Use the value modified by config.sub, and make the directory same as GNU utilities, such as binutils. Notes: Merged: https://github.com/ruby/ruby/pull/12043
2024-11-09[Bug #20800] Move executable binary file pathNobuyoshi Nakada
From under "libexec", under `$(target)/bin` like as binutils. Notes: Merged: https://github.com/ruby/ruby/pull/12043
2024-11-09[Bug #20800] Locate executable binary file under "libexec" directlyNobuyoshi Nakada
"libexec" means the directory for executable or binary files already. Notes: Merged: https://github.com/ruby/ruby/pull/12043
2024-11-09Update bundled gems list as of 2024-11-08git
2024-11-08Fix race condition in test_self_stopKJ Tsanaktsidis
This test was relying on a sleep to synchronise the parent and child processes. By having the child be the process that stops itself with SIGSTOP, instead of the parent, we can actually properly wait for that using waitpid2 and be notified of the stop. This use of sleep to synchronise processes is potentially flaky and caused failures under rr's `--chaos` mode. Notes: Merged: https://github.com/ruby/ruby/pull/12042
2024-11-08Fix benign off-by-oneJohn Hawthorn
Previously we always reserved one more byte than necessary in the sprintf output string. Notes: Merged: https://github.com/ruby/ruby/pull/12029
2024-11-08Fix update_coderange for binary stringsJohn Hawthorn
Although a binary (aka ASCII-8BIT) string will never have a broken coderange, it still has to differentiate between "valid" and "7bit". On Ruby 3.4/trunk this problem is masked because we now clear the coderange more agressively in rb_str_resize, and we happened to always be strinking this string, but we should not assume that. On Ruby 3.3 this created strings where `ascii_only?` was true in cases it shouldn't be as well as other problems. Fixes [Bug #20883] Co-authored-by: Daniel Colson <danieljamescolson@gmail.com> Co-authored-by: Matthew Draper <matthew@trebex.net> Notes: Merged: https://github.com/ruby/ruby/pull/12029
2024-11-08Fix memory leak in prism when syntax error in iseq compilationPeter Zhu
If there's a syntax error during iseq compilation then prism would leak memory because it would not free the pm_parse_result_t. This commit changes pm_iseq_new_with_opt to have a rb_protect to catch when an error is raised, and return NULL and set error_state to a value that can be raised by calling rb_jump_tag after memory has been freed. For example: 10.times do 10_000.times do eval("/[/=~s") rescue SyntaxError end puts `ps -o rss= -p #{$$}` end Before: 39280 68736 99232 128864 158896 188208 217344 246304 275376 304592 After: 12192 13200 14256 14848 16000 16000 16000 16064 17232 17952 Notes: Merged: https://github.com/ruby/ruby/pull/12036
2024-11-08[DOC] Doc for Array#zip (#11961)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2024-11-08YJIT: Always abandon the block when gen_branch() or defer_compilation() failsAlan Wu
In [1], we started checking for gen_branch failures, but I made two crucial mistakes. One, defer_compilation() had the same issue as gen_branch() but wasn't checked. Two, returning None from a codegen function does not throw away the block. Checking how gen_single_block() handles codegen functions, you can see that None terminates the block with an exit, but does not overall return an Err. This handling is fine for unimplemented instructions, for example, but incorrect in case gen_branch() fails. The missing branch essentially corrupts the block; adding more code after a missing branch doesn't correct the code. Always abandon the block when defer_compilation() or gen_branch() fails. [1]: cb661d7d82984cdb54485ea3f4af01ac21960882 Fixup: [1] Notes: Merged: https://github.com/ruby/ruby/pull/12035 Merged-By: XrXr
2024-11-08[ruby/prism] Fix splat after kwsplatHaldun Bayhantopcu
https://github.com/ruby/prism/commit/70c1cd480f
2024-11-08CI: In parse.y runs, use ./configure --with-parser=parse.yAlan Wu
Because tests might not use the command-line --parser option, or be aware that they should be, it's better to test with the default parser set. Notes: Merged: https://github.com/ruby/ruby/pull/12025
2024-11-09Check bignum multiplication digits overflowNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12034
2024-11-09Add integer overflow check macros for add/sub as well as mulNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12034
2024-11-08YJIT: Pass panic message to rb_bug()Alan Wu
So that the Rust panic message is forwarded to the RUBY_CRASH_REPORT system, instead of only the static "YJIT panicked" message done so previously. This helps with triaging crashes since it's easier than trying to parse stderr output. Sample: <internal:yjit_hook>:2: [BUG] YJIT: panicked at src/codegen.rs:1197:5: explicit panic ... Notes: Merged: https://github.com/ruby/ruby/pull/12027
2024-11-08[rubygems/rubygems] Fix private registry credentials being written to logssamisalamiws
https://github.com/rubygems/rubygems/commit/d070fa10c1 Co-authored-by: Artem Ignatyev <zazubrik@gmail.com>
2024-11-08[rubygems/rubygems] Warn on insecure materializationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bc2537de71
2024-11-08[rubygems/rubygems] Fix typoDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f68a2c30bb
2024-11-08[rubygems/rubygems] Simplify tests that deal with lockfile using only "ruby" ↵David Rodríguez
platform Using an old bundler version was necessary at the beginning because we checked the version of Bundler being run in order to enable the new behavior. But we removed that a long time ago and now we only look at whether the lockfile only includes "ruby" as a platform or not. https://github.com/rubygems/rubygems/commit/8fc3d38ff3
2024-11-08[rubygems/rubygems] Small tweakDavid Rodríguez
https://github.com/rubygems/rubygems/commit/98641d21a2
2024-11-08[rubygems/rubygems] Reduce global stateDavid Rodríguez
https://github.com/rubygems/rubygems/commit/43c0c41c6b
2024-11-08[rubygems/rubygems] Remove unnecessary attributeDavid Rodríguez
It's defined in the superclass already. https://github.com/rubygems/rubygems/commit/e269f5477b
2024-11-08[rubygems/rubygems] Cleaner extension of `Gem::Specification` to be able to ↵David Rodríguez
set source https://github.com/rubygems/rubygems/commit/3749273ec6
2024-11-08[rubygems/rubygems] Remove accessor that's been unused for yearsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ffd2fbaf6c
2024-11-08[rubygems/rubygems] Make sure platforms in spec lockfile are properly sortedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/99b4ac4548
2024-11-08Avoid calculating large powersYusuke Endoh
... for slow CI machines like macOS.
2024-11-08Avoid interger multiplication overflowYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/12033
2024-11-08Do not round `a**b` to infinityYusuke Endoh
... instead, just calculate the value unless it is too big. Also, this change raises an ArgumentError if it is expected to exceed 16 GB in a 64-bit environment. (It is possible to calculate it straightforward, but it would likely be out-of-memory, so I didn't think it would make sense.) [Feature #20811] Notes: Merged: https://github.com/ruby/ruby/pull/12033
2024-11-08[rubygems/rubygems] Add `bundle lock --add-checksums` to add checksums to an ↵David Rodríguez
existing lockfile https://github.com/rubygems/rubygems/commit/0a9c1ce60d
2024-11-08[rubygems/rubygems] Remove no longer necessary hacks to define the `gem` commandDavid Rodríguez
We did this because RubyGems `require` would call `gem` on self, so defining a `gem` method in the CLI would cause conflicts. However, this is not the case since https://github.com/rubygems/rubygems/commit/439c4464890958fec17b3aa65b9d3a4dbdd3bf90, so this should no longer be necessary. https://github.com/rubygems/rubygems/commit/3e5c861046
2024-11-08specify NOINLINE for LTOKoichi Sasada
Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08skip `SystemStackError`Koichi Sasada
with -O0 build, prism parser consumes a lot of machine stack and it doesn't work with minimum machine stack for threads, which specified with `RUBY_THREAD_MACHINE_STACK_SIZE=1`. So simply ignore `SystemStackError` for btest. Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08introduce `rb_ec_check_ints()`Koichi Sasada
to avoid TLS issue with N:M threads. Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08check closing flagKoichi Sasada
`Ractor.receive` and `Ractor.yield` should stop when the incoming/outgoing port is closed. Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08fix rjit-bindgen infoKoichi Sasada
Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08correct dependenciesKoichi Sasada
Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08support `require` in non-main RactorsKoichi Sasada
Many libraries should be loaded on the main ractor because of setting constants with unshareable objects and so on. This patch allows to call `requore` on non-main Ractors by asking the main ractor to call `require` on it. The calling ractor waits for the result of `require` from the main ractor. If the `require` call failed with some reasons, an exception objects will be deliverred from the main ractor to the calling ractor if it is copy-able. Same on `require_relative` and `require` by `autoload`. Now `Ractor.new{pp obj}` works well (the first call of `pp` requires `pp` library implicitly). [Feature #20627] Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08`Ractor.[]` and `Ractor.[]=`Koichi Sasada
`Ractor#[]/[]=` is only for accessors to the current ractor, so that `Ractor.[]/[]=` is simpler. [Feature #20715] Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08`Ractor.main?`Koichi Sasada
to return the current ractor is the main ractor. (== `Ractor.current == Ractor.main`) Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08`interrupt_exec`Koichi Sasada
introduce - rb_threadptr_interrupt_exec - rb_ractor_interrupt_exec to intercept the thread/ractor execution. Notes: Merged: https://github.com/ruby/ruby/pull/11142
2024-11-08Update default gems list at 35d8427b8b393e1ea6977872d9246e [ci skip]git
2024-11-08[ruby/uri] Bump up v1.0.1Hiroshi SHIBATA
https://github.com/ruby/uri/commit/3011eb6f6e
2024-11-08[ruby/uri] Added more fallback constants like URI::PARTTERN and URI::REGEXPHiroshi SHIBATA
Fixed https://github.com/ruby/uri/issues/125 https://github.com/ruby/uri/commit/1f3d3df02a
2024-11-08Update default gems list at 7772fe05bcb212a96684ea763b7e5c [ci skip]git
2024-11-08[ruby/win32-registry] Bump up v0.1.0Hiroshi SHIBATA
https://github.com/ruby/win32-registry/commit/a87076ee42
2024-11-08Update default gems list at 7c9cda9b52b6eabde597f265b652c8 [ci skip]git
2024-11-08[ruby/time] Bump up v0.4.1Hiroshi SHIBATA
https://github.com/ruby/time/commit/539b151049
2024-11-08Update default gems list at a698b5ebb88ceb54cad4d50abdb4fb [ci skip]git