Граф коммитов

9083 Коммитов

Автор SHA1 Сообщение Дата
KJ Tsanaktsidis 25711e7063 Partially revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls"
This _partially_ reverts commit
d2ba8ea54a, but for UDP sockets only.

With TCP sockets (and other things which use `rsock_init_inetsock`), the
order of operations is to call `getaddrinfo(3)` with AF_UNSPEC, look at
the returned addresses, pick one, and then call `socket(2)` with the
family for that address (i.e. AF_INET or AF_INET6).

With UDP sockets, however, this is reversed; `UDPSocket.new` takes an
address family as an argument, and then calls `socket(2)` with that
family. A subsequent call to UDPSocket#connect will then call
`getaddrinfo(3)` with that family.

The problem here is that...

* If you are in a networking situation that _only_ has loopback addrs,
* And you want to look up a name like "localhost" (or NULL)
* And you pass AF_INET or AF_INET6 as the ai_family argument to
  getaddrinfo(3),
* And you pass AI_ADDRCONFIG to the hints argument as well,

then glibc on Linux will not return an address. This is because
AI_ADDRCONFIG is supposed to return addresses for families we actually
have an address for and could conceivably connect to, but also is
documented to explicitly ignore localhost in that situation.

It honestly doesn't make a ton of sense to pass AI_ADDRCONFIG if you're
explicitly passing the address family anyway, because you're not looking
for "an address for this name we can connect to"; you're looking for "an
IPv(4|6) address for this name". And the original glibc bug that
d2ba8ea5 was supposed to work around was related to parallel issuance of
A and AAAA queries, which of course won't happen if an address family is
explicitly specified.

So, we fix this by not passing AI_ADDRCONFIG for calls to
`rsock_addrinfo` that we also pass an explicit family to (i.e. for
UDPsocket).

[Bug #20048]
2023-12-12 20:05:21 +11:00
Koichi Sasada c4c39082af add `flags` to `rb_postponed_job_preregister`
for future extensions.
2023-12-10 15:39:06 +09:00
KJ Tsanaktsidis f8effa209a Change the semantics of rb_postponed_job_register
Our current implementation of rb_postponed_job_register suffers from
some safety issues that can lead to interpreter crashes (see bug #1991).
Essentially, the issue is that jobs can be called with the wrong
arguments.

We made two attempts to fix this whilst keeping the promised semantics,
but:
  * The first one involved masking/unmasking when flushing jobs, which
    was believed to be too expensive
  * The second one involved a lock-free, multi-producer, single-consumer
    ringbuffer, which was too complex

The critical insight behind this third solution is that essentially the
only user of these APIs are a) internal, or b) profiling gems.

For a), none of the usages actually require variable data; they will
work just fine with the preregistration interface.

For b), generally profiling gems only call a single callback with a
single piece of data (which is actually usually just zero) for the life
of the program. The ringbuffer is complex because it needs to support
multi-word inserts of job & data (which can't be atomic); but nobody
actually even needs that functionality, really.

So, this comit:
  * Introduces a pre-registration API for jobs, with a GVL-requiring
    rb_postponed_job_prereigster, which returns a handle which can be
    used with an async-signal-safe rb_postponed_job_trigger.
  * Deprecates rb_postponed_job_register (and re-implements it on top of
    the preregister function for compatability)
  * Moves all the internal usages of postponed job register
    pre-registration
2023-12-10 15:00:37 +09:00
Matheus Richard d69af4788a [ruby/io-console] [DOC] Add documentation for IO#cursor
ruby/io-console#50

https://github.com/ruby/io-console/commit/ee752ce771
2023-12-07 10:50:00 +00:00
KJ Tsanaktsidis d2ba8ea54a
Set AI_ADDRCONFIG when making getaddrinfo(3) calls for outgoing conns (#7295)
When making an outgoing TCP or UDP connection, set AI_ADDRCONFIG in the
hints we send to getaddrinfo(3) (if supported). This will prompt the
resolver to _NOT_ issue A or AAAA queries if the system does not
actually have an IPv4 or IPv6 address (respectively).

This makes outgoing connections marginally more efficient on
non-dual-stack systems, since we don't have to try connecting to an
address which can't possibly work.

More importantly, however, this works around a race condition present
in some older versions of glibc on aarch64 where it could accidently
send the two outgoing DNS queries with the same DNS txnid, and get
confused when receiving the responses. This manifests as outgoing
connections sometimes taking 5 seconds (the DNS timeout before retry) to
be made.

Fixes #19144
2023-12-07 17:55:15 +09:00
Peter Zhu 64ab04da6a [ruby/bigdecimal] Clarify that JSON methods come from the JSON gem
https://github.com/ruby/bigdecimal/commit/581725d4e5
2023-12-06 16:14:54 +00:00
BurdetteLamar dab5a4b61a [ruby/bigdecimal] [DOC] Add section Methods for Working with JSON
https://github.com/ruby/bigdecimal/commit/2edd8d0a23
2023-12-06 14:59:23 +00:00
Hiroshi SHIBATA eecae51502 [flori/json] Bump up 2.7.1
https://github.com/flori/json/commit/a1af7a308c
2023-12-05 15:09:56 +09:00
Hiroshi SHIBATA a399c1f26d
Removed obsoleted version definition 2023-12-05 12:04:35 +09:00
Hiroshi SHIBATA bf5368493b [flori/json] Detect json version from version.rb
https://github.com/flori/json/commit/3ef57b5b39
2023-12-05 12:04:11 +09:00
Hiroshi SHIBATA abc3d124f7 [flori/json] The modern Ruby uses utf-8 encodings by default
https://github.com/flori/json/commit/11b31210ac
2023-12-05 12:04:10 +09:00
Burdette Lamar c8faaf4c7e [flori/json] [DOC] RDoc for additions
(https://github.com/flori/json/pull/557)

* RDoc for additions

* Update lib/json/add/time.rb

Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>

---------

https://github.com/flori/json/commit/3f2efd60f7

Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2023-12-05 12:04:09 +09:00
tompng 70740deea7 [flori/json] Fix JSON.dump overload combination
https://github.com/flori/json/commit/41c2712a3b
2023-12-05 12:04:08 +09:00
Takashi Kokubun e6b35e8a6d [flori/json] Overload kwargs in JSON.dump
https://github.com/flori/json/commit/936f280f9f
2023-12-05 12:04:08 +09:00
Jean Boussier a22ed89438 [flori/json] JSON.dump: handle unenclosed hashes regression
Fix: https://github.com/flori/json/issues/553

We can never add keyword arguments to `dump` otherwise
existing code using unenclosed hash will break.

https://github.com/flori/json/commit/8e0076a3f2
2023-12-05 12:04:07 +09:00
Hiroshi SHIBATA 86045fca24
Manually merged from flori/json
> https://github.com/flori/json/pull/525
  > Rename escape_slash in script_safe and also escape E+2028 and E+2029

  Co-authored-by: Jean Boussier <jean.boussier@gmail.com>

  > https://github.com/flori/json/pull/454
  > Remove unnecessary initialization of create_id in JSON.parse()

  Co-authored-by: Watson <watson1978@gmail.com>
2023-12-01 16:47:06 +09:00
Jean Boussier 0dfeb17296
Rename escape_slash in script_safe and also escape E+2028 and E+2029
It is rather common to directly interpolate JSON string inside
<script> tags in HTML as to provide configuration or parameters to a
script.

However this may lead to XSS vulnerabilities, to prevent that 3
characters need to be escaped:

  - `/` (forward slash)
  - `U+2028` (LINE SEPARATOR)
  - `U+2029` (PARAGRAPH SEPARATOR)

The forward slash need to be escaped to prevent closing the script
tag early, and the other two are valid JSON but invalid Javascript
and can be used to break JS parsing.

Given that the intent of escaping forward slash is the same than escaping
U+2028 and U+2029, I chos to rename and repurpose the existing `escape_slash`
option.
2023-12-01 16:47:06 +09:00
Jean Boussier 698cb84062
Use ruby_xfree to free buffers
They are allocated with ruby_xmalloc, they should be freed with
ruby_xfree.
2023-12-01 16:47:06 +09:00
Hiroshi SHIBATA 32f289d118
[flori/json] Bump up 2.7.0
https://github.com/flori/json/commit/ca546128f2
2023-12-01 16:47:06 +09:00
John Hawthorn 4b770527c2
[flori/json] Fix "unexpected token" offset for Infinity
Previously in the JSON::Ext parser, when we encountered an "Infinity"
token (and weren't allowing NaN/Infinity) we would try to display the
"unexpected token" at the character before.

https://github.com/flori/json/commit/42ac170712
2023-12-01 16:47:06 +09:00
flosacca 30e4778020 [ruby/cgi] Fix unescapeHTML
https://github.com/ruby/cgi/commit/67610e6ca8
2023-11-30 08:19:28 +00:00
Nobuyoshi Nakada ac9fdb7a50
Adjust indent [ci skip] 2023-11-30 13:32:53 +09:00
Misaki Shioi 5f62b1d00c Rename rsock_raise_socket_error to rsock_raise_resolution_error
Again, rsock_raise_socket_error is called only when getaddrinfo and getaddrname fail
2023-11-30 13:27:19 +09:00
Misaki Shioi 52f6de4196 Replace SocketError with Socket::ResolutionError in rsock_raise_socket_error
rsock_raise_socket_error is called only when getaddrinfo and getaddrname fail
2023-11-30 13:27:19 +09:00
Misaki Shioi e9050270d7 Add Socket::ResolutionError & Socket::ResolutionError#error_code
Socket::ResolutionError#error_code returns Socket::EAI_XXX
2023-11-30 13:27:19 +09:00
Jean Boussier 982641939c Further fix the GVL instrumentation API
Followup: https://github.com/ruby/ruby/pull/9029

[Bug #20019]

Some events still weren't triggered from the right place.

The test suite was also improved a bit more.
2023-11-28 20:06:55 +01:00
Yusuke Endoh 62c816410f Retry pthread_create a few times
According to https://bugs.openjdk.org/browse/JDK-8268605, pthread_create
may fail spuriously. This change implements a simple retry as a modest
measure, which is also used by JDK.
2023-11-28 20:49:12 +09:00
Sutou Kouhei def416899d [ruby/stringio] Development of 3.1.1 started.
https://github.com/ruby/stringio/commit/75da93d48f
2023-11-28 01:38:41 +00:00
Jean Boussier 23a7714343 Refactor and fix the GVL instrumentation API
This entirely changes how it is tested. Rather than to use counters
we now record the timeline of events with associated threads which
makes it much easier to assert that certains events are only preceded
by a specific event, and makes it much easier to debug unexpected
timelines.

Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
Co-Authored-By: JP Camara <jp@jpcamara.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
2023-11-27 17:37:57 +01:00
Benoit Daloze 1c3088117a [ruby/stringio] Do not compile the C extension on TruffleRuby
* Before this it was compiled but not used, because TruffleRuby has
  a stringio.rb in stdlib and .rb has precedence over .so.
  In fact that extension never worked on TruffleRuby,
  because rb_io_extract_modeenc() has never been defined on TruffleRuby.
* So this just skip compiling the extension since compilation of it now fails:
  https://github.com/ruby/openssl/issues/699

https://github.com/ruby/stringio/commit/d791b63df6
2023-11-27 12:21:24 +00:00
Mau Magnaguagno 67ee91a305 [ruby/psych] Prefer each_char in Psych::Visitors::Visitor::ToRuby#deserialize
Use safe navigation operator with each_char to remove empty strings and improve readability.

https://github.com/ruby/psych/commit/5fe714b216
2023-11-27 01:35:08 +00:00
Jun Aruga 3140886b75 [ruby/openssl] History.md: Escape Markdown syntax Italic "*". [ci skip]
https://github.com/ruby/openssl/commit/dc26433ae5
2023-11-25 10:05:24 +00:00
Jean Boussier 6391ae9ebc objspace_dump.c: dump call cache ids with dump_append_id
Not all `ID` have an associated string.

Fixes a SEGFAULT in ObjectSpace.dump_all spec.
2023-11-22 10:24:35 +01:00
yui-knk c3ab946e86 `ObjectSpace.count_nodes` doesn't count nodes
Node has not been managed by GC from Ruby 2.5.
Therefore these codes are not needed. If ObjectSpace depends on Node,
it needs to update the file when node type is updated. Delete node
related codes to avoid such update.
2023-11-21 14:39:06 +09:00
Aaron Patterson 6fce8c7980 Don't try compacting ivars on Classes that are "too complex"
Too complex classes use a hash table to store ivs, and should always pin
their IVs.  We shouldn't touch those classes in compaction.
2023-11-20 16:09:48 -08:00
Peter Zhu 68869e9bd9 Revert "Revert "Remove SHAPE_CAPACITY_CHANGE shapes""
This reverts commit 5f3fb4f4e3.
2023-11-13 18:26:36 -05:00
John Hawthorn b41270842a Record more info from CALLCACHE in heap dumps
This records the called_id and klass from imemo_callcache objects in
heap dumps.
2023-11-13 15:03:11 -08:00
Jean Boussier 9ca41e9991 GVL Instrumentation: pass thread->self as part of event data
Context: https://github.com/ivoanjo/gvl-tracing/pull/4

Some hooks may want to collect data on a per thread basis.
Right now the only way to identify the concerned thread is to
use `rb_nativethread_self()` or similar, but even then because
of the thread cache or MaNy, two distinct Ruby threads may report
the same native thread id.

By passing `thread->self`, hooks can use it as a key to store
the metadata.

NB: Most hooks are executed outside the GVL, so such data collection
need to use a thread-safe data-structure, and shouldn't use the
reference in other ways from inside the hook.

They must also either pin that value or handle compaction.
2023-11-13 08:45:20 +01:00
Peter Zhu 5f3fb4f4e3 Revert "Remove SHAPE_CAPACITY_CHANGE shapes"
This reverts commit f6910a6112.

We're seeing crashes in the test suite of Shopify's core monolith after
this change.
2023-11-10 11:27:49 -05:00
Nobuyoshi Nakada cdd6127c82 [ruby/io-console] bump up to 0.6.1.dev.1
https://github.com/ruby/io-console/commit/057ab96a73
2023-11-10 19:00:50 +09:00
Nobuyoshi Nakada 83064592a6 [ruby/io-console] Include FFI version version.rb
https://github.com/ruby/io-console/commit/b0c688c57e
2023-11-10 19:00:48 +09:00
Nobuyoshi Nakada f08400a07a [ruby/io-console] Define IO::ConsoleMode::VERSION from gemspec
https://github.com/ruby/io-console/commit/ebdbebf461
2023-11-10 19:00:46 +09:00
Nobuyoshi Nakada 5309e3c406 [ruby/io-console] Update file list in gemspec
https://github.com/ruby/io-console/commit/0bfde8372c
2023-11-10 19:00:45 +09:00
Peter Zhu f6910a6112 Remove SHAPE_CAPACITY_CHANGE shapes
We don't need to create a shape to transition capacity as we can
transition the capacity when the capacity of the SHAPE_IVAR changes.
2023-11-09 09:25:02 -05:00
Nobuyoshi Nakada 195a09cc7f [ruby/digest] Suppress implicit cast down warnings
https://github.com/ruby/digest/commit/2f3505bf3f
2023-11-09 07:20:00 +00:00
Sutou Kouhei 8cd6c65af1 [ruby/stringio] Development of 3.1.0 started.
https://github.com/ruby/stringio/commit/a2f8ef1a6a
2023-11-08 07:04:15 +00:00
Sutou Kouhei 7ed37388fb [ruby/stringio] Add missing row separator encoding conversion
(https://github.com/ruby/stringio/pull/69)

The conversion logic is borrowed from ruby/ruby's io.c:
40391faeab/io.c (L4059-L4079)

Fix ruby/stringio#68

Reported by IWAMOTO Kouichi. Thanks!!!

https://github.com/ruby/stringio/commit/4b170c1a68
2023-11-08 00:46:17 +00:00
Sutou Kouhei ce8301084f [ruby/strscan] Bump version
https://github.com/ruby/strscan/commit/1b3393be05
2023-11-08 09:26:58 +09:00
Sutou Kouhei 9c2e0d49fe [ruby/fiddle] Remove garbage
https://github.com/ruby/fiddle/commit/bbcb66e16e
2023-11-08 09:25:45 +09:00
Sutou Kouhei c19ea1066a [ruby/fiddle] Include stdbool.h explicitly for old Ruby
https://github.com/ruby/fiddle/commit/74a05fb358
2023-11-08 09:25:45 +09:00
Sutou Kouhei 2a6d6d3d65 [ruby/fiddle] Use Ruby's true/false for C bool
GitHub: fix https://github.com/ruby/fiddle/pull/130

Reported by Benoit Daloze. Thanks!!!

https://github.com/ruby/fiddle/commit/2640e0148e
2023-11-08 09:25:44 +09:00
BurdetteLamar d12e881009
[flori/json] Enhanced RDoc for Range extensions
https://github.com/flori/json/commit/ec47749b53
2023-11-08 09:04:28 +09:00
Nobuyoshi Nakada 1910bd4247
String for string literal is not resizable 2023-11-08 00:59:45 +09:00
Jean Boussier ced84beb25 [ruby/cgi] Add snake case aliases for escapeURIComponent
As agreed in [Feature #18822]

https://github.com/ruby/cgi/commit/9d1161ec9d
2023-11-07 10:22:30 +00:00
Hiroshi SHIBATA 3d5fef7712 [ruby/zlib] Bump up 3.1.0
https://github.com/ruby/zlib/commit/2561e122ac
2023-11-07 08:50:40 +00:00
Hiroshi SHIBATA 79544157e4 [ruby/zlib] Support Ruby 2.5+ again
https://github.com/ruby/zlib/commit/661ea3ec5f
2023-11-07 08:47:03 +00:00
Hiroshi SHIBATA fbb63605c4 [ruby/pathname] Bump up 0.3.0
https://github.com/ruby/pathname/commit/f3d23679b0
2023-11-07 07:55:13 +00:00
Hiroshi SHIBATA d63c29ceca [ruby/fcntl] Bump up 1.1.0
https://github.com/ruby/fcntl/commit/fe780abe07
2023-11-07 06:55:45 +00:00
Hiroshi SHIBATA eaf0ca4cfe [ruby/win32ole] Bump up 1.8.10
https://github.com/ruby/win32ole/commit/9a18f388a9
2023-11-07 05:52:50 +00:00
Tim Kretschmer e584a619e1 [ruby/bigdecimal] fixed docs for .scale
the scale of `1` is actually 0

https://github.com/ruby/bigdecimal/commit/9a8bc9c417
2023-11-07 05:35:18 +00:00
Koichi ITO f0abe610a3 [ruby/bigdecimal] Update doc for bigdecimal/util
Follow up https://github.com/ruby/bigdecimal/issues/89.

`BigDecimal.new` has already been removed. This PR replaces `BigDecimal.new` with
`Kernel.BigDecimal` in the documentation, following the message below:

> BigDecimal.new is deprecated; use Kernel.BigDecimal method instead.

26d84ba766

https://github.com/ruby/bigdecimal/commit/dd52adf3b2
2023-11-07 05:32:49 +00:00
Hiroshi SHIBATA da2cf947bc [ruby/date] Bump up 3.3.4
https://github.com/ruby/date/commit/50e18d2684
2023-11-07 04:16:02 +00:00
Yusuke Endoh 49b6dc8f07 Prevent cpu_set_t overflow even if there are more than 63 cores
Do not use `pthread_attr_setaffinity_np` if `sched_getcpu()` exceeds
`CPU_SETSIZE`. (Using `CPU_ALLOC()` would be more appropriate.)
2023-11-07 04:39:09 +09:00
Yusuke Endoh deb6dd76e1 Fix a memory leak
pointed by @nobu
2023-11-07 04:39:09 +09:00
Yusuke Endoh dc636fec2a Use pthread_attr_setaffinity_np instead of pthread_setaffinity_np 2023-11-07 04:39:09 +09:00
Yusuke Endoh d0066211f2 Detach a pthread after pthread_setaffinity_np
After a pthread for getaddrinfo is detached, we cannot predict when the
thread will exit. It would lead to a segfault by setting
pthread_setaffinity to the terminated pthread.  I guess this problem
would be more likely to occur in high-load environments.

This change detaches the pthread after pthread_setaffinity is called.
[Feature #19965]
2023-11-07 04:39:09 +09:00
Yusuke Endoh 15560cce5f Revert "Do not use pthread_setaffinity_np on s390x"
This reverts commit de82439215.
2023-11-07 04:39:09 +09:00
Nobuyoshi Nakada 40391faeab [ruby/etc] Fix inconsistent dll linkage warning
https://github.com/ruby/etc/commit/e4c71e5996
2023-11-05 11:50:07 +00:00
Nobuyoshi Nakada 79d0879536 [ruby/stringio] Make STRINGIO_VERSION uniform
https://github.com/ruby/stringio/commit/4400bf3380
2023-11-04 19:28:49 +09:00
Nobuyoshi Nakada b30783e02e [ruby/stringio] Move Java version to Java directory
https://github.com/ruby/stringio/commit/3f90a0d619
2023-11-04 19:28:39 +09:00
Peter Zhu 38ba040d8b Make every initial size pool shape a root shape
This commit makes every initial size pool shape a root shape and assigns
it a capacity of 0.
2023-11-02 13:42:11 -04:00
Daisuke Aritomo 4adf418be9 [Feature #10602] Add new API rb_profile_thread_frames()
Add a new API rb_profile_thread_frames(), which is essentialy a
per-thread version of rb_profile_frames().

While the original rb_profile_frames() always returns results about the
current active thread obtained by GET_EC(), this new API takes a Thread
to be profiled as an argument.

This should come in handy when profiling I/O-bound programs such as
webapps, since this new API allows us to learn about Threads performing
I/O (which do not have the GVL).

Profiling worker threads (such as Sidekiq workers) may be another
application.

Implements [Feature #10602]

Co-authored-by: Mike Perham <mike@perham.net>
2023-10-31 11:16:18 +09:00
Nobuyoshi Nakada 88f1d380ea [ruby/etc] Start 1.4.3
https://github.com/ruby/etc/commit/a9e4d4730d
2023-10-29 07:15:24 +00:00
KJ Tsanaktsidis e74ea904ad [ruby/zlib] Check for z_size_t along with {crc,adler}32_z in
extconf.rb
(https://github.com/ruby/zlib/pull/69)

The android NDK (android-ndk-r21e) does not have crc32_z, adler32_z, nor
z_size_t in its zlib.h header file. However, it _does_ have the crc32_z
and adler32_z symbols in the libz.a static library!

mkmf performs two tests for have_func:
* It sees if a program that includes the header and takes the address of
  the symbol can compile
* It sees if a program that defines the symbol as `extern void sym_name()`
  and calls it can be linked

If either test works, it considers the function present. The
android-ndk-r21e is passing the second test but not the first for
crc32_z/adler32_z. So, we define HAVE_ZLIB_SIZE_T_FUNCS, but then can't
actually compile the extension (since the prototypes aren't in the
header file).

We can keep this working how it was working before by _also_ checking
for `have_type("z_size_t", "zlib.h")`. The have_type check _only_ looks
in the header file for the type; if a program including the header file
and using the type can't compile, the type is considered absent
regardless of what might be in libz.a.

https://github.com/ruby/zlib/commit/3b9fe962d8
2023-10-26 09:56:21 +00:00
KJ Tsanaktsidis ac4d687656 [ruby/zlib] Fix misdetection of {crc32,alder32}_z in cloudflare zlib fork
We use the Cloudflare fork of zlib
(https://github.com/cloudflare/zlib), which we find gives improved
performance on AWS Graviton ARM instances. That fork does not define
crc32_z and alder32_z functions.

Until two days ago, Ruby's zlib gem worked fine, because cloudflare zlib
_also_ did not define z_size_t, which meant Ruby did not try and use
these functions.

Since a3ba99596d
however, cloudflare zlib _does_ define z_size_t (but NOT crc32_z or
alder32_z). The zlib gem would try and use these nonexistant
functions and not compile.

This patch fixes it by actually specifically detecting the functions
that the gem wants to call, rather than just the presence of the
z_size_t type.

https://github.com/ruby/zlib/commit/c96e8b9a57
2023-10-26 02:17:54 +00:00
Yusuke Endoh de82439215 Do not use pthread_setaffinity_np on s390x
Looks like it randomly causes a segfault

https://rubyci.s3.amazonaws.com/rhel_zlinux/ruby-master/log/20231025T093302Z.fail.html.gz
```
[11186/26148] TestNetHTTP_v1_2#test_set_form/home/chkbuild/build/20231025T093302Z/ruby/tool/lib/webrick/httprequest.rb:197: [BUG] Segmentation fault at 0x000003ff1ffff000
ruby 3.3.0dev (2023-10-25T07:50:00Z master 526292d9fe) [s390x-linux]
```
2023-10-25 20:04:18 +09:00
Yusuke Endoh 25c1204fe7 rb_getaddrinfo should return EAI_AGAIN instead of EAGAIN 2023-10-24 12:22:53 +09:00
Yusuke Endoh c08020254e Indent critical regions with blocks
Cosmetic change per ko1's preference
2023-10-24 12:22:53 +09:00
Yusuke Endoh acd774263c Do not use pthread on mingw 2023-10-24 12:22:53 +09:00
Yusuke Endoh 16d6a22757 Make rb_getnameinfo interruptible
Same as previous commit for rb_getnameinfo.
2023-10-24 12:22:53 +09:00
Yusuke Endoh 3dc311bdc8 Make rb_getaddrinfo interruptible
When pthread_create is available, rb_getaddrinfo creates a pthread and
executes getaddrinfo(3) in it. The caller thread waits for the pthread
to complete, but detaches it if interrupted. This allows name resolution
to be interuppted by Timeout.timeout, etc. even if it takes a long time
(for example, when the DNS server does not respond).  [Feature #19965]
2023-10-24 12:22:53 +09:00
Yusuke Endoh efd58f19ea Expand macro branches to make them plain 2023-10-24 12:22:53 +09:00
Yusuke Endoh 25ef8d262a Refactor GETADDRINFO_IMPL instead of GETADDRINFO_EMU
This is a preparation for introducing cancellable
getaddrinfo/getnameinfo.
2023-10-24 12:22:53 +09:00
Yusuke Endoh 9ce607a8d4 refactor a call to getaddrinfo 2023-10-24 12:22:53 +09:00
Samuel Williams 30f5a2bbcd [ruby/io-nonblock] Don't define nonblock methods if they are defined by core.
https://github.com/ruby/io-nonblock/commit/5d3991859c
2023-10-23 22:53:00 +00:00
Nobuyoshi Nakada 7578bc35f9 [ruby/io-console] Intersperse Win32 and termios implementations
So that the both sources appear in RDoc generated HTMLs.

https://github.com/ruby/io-console/commit/beec164a47
2023-10-22 03:18:34 +00:00
Nobuyoshi Nakada 8c0c7be65b [ruby/io-console] Start 0.6.1
https://github.com/ruby/io-console/commit/06307a755d
2023-10-22 02:30:39 +00:00
Nobuyoshi Nakada c7731b35eb
[ruby/io-console] [DOC] Split .document files to sync with ruby/ruby
https://github.com/ruby/io-console/commit/13e0bcac9f
2023-10-22 11:09:06 +09:00
Nobuyoshi Nakada cabf3dac36 [ruby/io-console] [DOC] Add .document
https://github.com/ruby/io-console/commit/62a677b51a
2023-10-21 22:58:43 +00:00
yui-knk 9ea1ee66c9 Stop creating ripper.h because it's not used 2023-10-20 12:56:04 +09:00
Yusuke Endoh 7362c484c8 Use rb_getnameinfo instead of directly using getnameinfo 2023-10-17 18:21:40 +09:00
Hiroshi SHIBATA d1f781b0d4 [ruby/psych] Bump up v5.1.1.1
https://github.com/ruby/psych/commit/51cc86ff3f
2023-10-16 11:55:01 +00:00
John Hawthorn 1c871c08d9 Switch mid dump to dump_append_string_value
I don't think it's possible to create a CI with a mid which would need
escaping to be in a JSON string, but I think we might as well not rely
on that assumption.
2023-10-12 10:22:32 +02:00
John Hawthorn 635b92099e Fix ObjectSpace.dump with super() callinfo
super() uses 0 as mid for its callinfo, so we need to check for that to
avoid a segfault when using dump_all.
2023-10-12 10:22:32 +02:00
Hiroshi SHIBATA 8f6a96e6ad [ruby/psych] Bump up v5.1.1
https://github.com/ruby/psych/commit/f306512d60
2023-10-11 06:13:53 +00:00
Nobuyoshi Nakada ceec988f2e ripper: Support member references in the DSL 2023-10-10 00:09:52 +09:00
Nobuyoshi Nakada a5cc6341c0
Remove `NODE_VALUES`
This node type was added for the multi-value experiment back in 2004.
The feature itself was removed after a few years, but this is its
remnant.
2023-10-06 03:39:58 +09:00
Jean byroot Boussier f087f2c74c [ruby/stringio] StringIO#pread: handle 0 length like IO#pread
(https://github.com/ruby/stringio/pull/67)

Fix: https://github.com/ruby/stringio/issues/66

If length is 0, IO#pread don't even try to read the IO, it simply return
the buffer untouched if there is one or a new empty buffer otherwise.

It also doesn't validate the offset when length is 0.

cc @jdelStrother @kou

https://github.com/ruby/stringio/commit/37e9279337

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2023-10-05 07:44:08 +00:00
Nobuyoshi Nakada 70e1635950 Move internal NODE_DEF_TEMP to parse.y 2023-10-05 14:23:42 +09:00
Nobuyoshi Nakada e501613efa [ruby/bigdecimal] Bump up to 3.1.5
https://github.com/ruby/bigdecimal/commit/c47802e813
2023-10-04 02:50:15 +00:00