summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2024-12-16Fix compaction check for ObjectSpace.trace_object_allocationsPeter Zhu
We should be checking for key for moved objects rather than the value because the key is a Ruby object and the value is malloc'd memory. Notes: Merged: https://github.com/ruby/ruby/pull/12339
2024-12-16[ruby/psych] Don't autolink Exception in psych module docszzak
https://docs.ruby-lang.org/en/master/Psych.html#module-Psych-label-Exception+handling https://github.com/ruby/psych/commit/c53c298222
2024-12-16[ruby/digest] Bump up v3.2.0Hiroshi SHIBATA
https://github.com/ruby/digest/commit/26c757fe9a
2024-12-16Lock released version of fiddle-1.1.6Hiroshi SHIBATA
2024-12-16[ruby/fiddle] ffi_backend: convert numeric function args to pointersDani Smith
(https://github.com/ruby/fiddle/pull/162) This allows for passing integers as pointer arguments to functions when using the FFI backend. This is a workaround until we can get JRuby's FFI implementation to allow for it directly (see also https://github.com/jruby/jruby/pull/8423) --------- https://github.com/ruby/fiddle/commit/e2f0952e9b Co-authored-by: Benoit Daloze <eregontp@gmail.com>
2024-12-16[ruby/strscan] [DOC] Add syntax highlighting to MarkDown code blocksAlexander Momchilov
(https://github.com/ruby/strscan/pull/126) Split off from https://github.com/ruby/ruby/pull/12322 https://github.com/ruby/strscan/commit/9bee37e0f5
2024-12-16[ruby/strscan] Bump versionSutou Kouhei
https://github.com/ruby/strscan/commit/fd140b8582
2024-12-16[DOC] Fix broken parameter display and see links for Socketnvh0412
Notes: Merged: https://github.com/ruby/ruby/pull/12350
2024-12-15Fix broken links to `Socket.tcp_fast_fallback=`Stan Lo
Since it's a singleton method, it should be referenced as `Socket.tcp_fast_fallback=`, not `Socket#tcp_fast_fallback=`. Notes: Merged: https://github.com/ruby/ruby/pull/12348
2024-12-15[ruby/date] Fix broken rdoc-ref to the calendar pageStan Lo
https://github.com/ruby/date/commit/cb52e64be1
2024-12-14Improve APIs for Globally Enabling/Disabling fast_fallback in Socket (#12257)Misaki Shioi
This change includes the following updates: - Added an environment variable `RUBY_TCP_NO_FAST_FALLBACK` to control enabling/disabling fast_fallback - Updated documentation and man pages - Revised the implementation of Socket.tcp_fast_fallback= and Socket.tcp_fast_fallback, which previously performed dynamic name resolution of constants and variables. As a result, the following performance improvements were achieved: (Case of 1000 executions of `TCPSocket.new` to the local host) Rehearsal ----------------------------------------- before 0.031462 0.147946 0.179408 ( 0.249279) after 0.031164 0.146839 0.178003 ( 0.346935) -------------------------------- total: 0.178003sec user system total real before 0.027584 0.138712 0.166296 ( 0.233356) after 0.025953 0.127608 0.153561 ( 0.237971) Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-12-13Lock released version of stringio-3.1.2Hiroshi SHIBATA
2024-12-13[ruby/zlib] Bump up v3.2.1Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/d2e29b23c8
2024-12-12[ruby/win32ole] Deprecate old constants in toplevelNobuyoshi Nakada
https://github.com/ruby/win32ole/commit/eaa1507262
2024-12-12[ruby/win32ole] [DOC] Hide old constants for the backward compatibility from ↵Nobuyoshi Nakada
RDoc https://github.com/ruby/win32ole/commit/99e1ea403f
2024-12-12[ruby/win32ole] [DOC] Fix a markup for codeNobuyoshi Nakada
https://github.com/ruby/win32ole/commit/542d39372c
2024-12-12Lock released version of strscan-3.1.1Hiroshi SHIBATA
2024-12-11Use ruby_strdup/xfree in fast_fallbackJohn Hawthorn
Any memory allocated with xmalloc needs to be matched with xfree rather than plain free. Ruby unfortunately redefines strdup to be ruby_strdup, which uses xmalloc so needs to be xfreed. Previously these were mismatched. This commit changes the copy to be an explicit ruby_strdup (to avoid confusion) and the free to be xfree. Notes: Merged: https://github.com/ruby/ruby/pull/12311
2024-12-11Use `rb_thread_fd_select` instead of select(2) (#12292)Misaki Shioi
* Use `rb_thread_fd_select` instead of select(2) For fixing https://bugs.ruby-lang.org/issues/20932 . `TCPSocket.new`, which internally uses select(2) for HEv2, can cause SEGV if the number of file descriptors exceeds `FD_SETSIZE`. This change avoids that issue by replacing select(2) with `rb_thread_fd_select`, which is provided as part of Ruby's internal API. --- This includes the following changes. * rb_thread_fd_select does not need common pipe Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-12-11[ruby/digest] Bump up v3.2.0.pre0, preparing to stable releaseHiroshi SHIBATA
https://github.com/ruby/digest/commit/d19c84fd68
2024-12-11[ruby/fiddle] dlopen: add support for INPUT(-lXXX)Sutou Kouhei
GitHub: fix https://github.com/ruby/fiddle/pull/166 Arch Linux's libncurses.so uses this style. https://github.com/ruby/fiddle/commit/77d3dc934f
2024-12-11[ruby/fiddle] Implement `Fiddle::Pointer.read` and `.write` on theLars Kanis
FFI backend (https://github.com/ruby/fiddle/pull/165) https://github.com/ruby/fiddle/commit/0bd963d3b8
2024-12-10[ruby/resolv] Build the extension library only when CRuby (FixNobuyoshi Nakada
https://github.com/ruby/resolv/pull/69) On JRuby no C compiler is available and this call results in a runtime error. https://github.com/ruby/resolv/commit/33105bc504
2024-12-09objspace_dump: Use FILE* to avoid crashing in mark functionsAlan Wu
We observed crashes from rb_io_bufwrite() thread switching (through rb_thread_check_ints()) in the middle of rb_execution_context_mark(). By the time rb_execution_context_mark() gets a timeslice again, it read garbage from a frame that was already popped in another thread, crashing the process in SEGV. Other mark functions probably have their own ways of breaking, but clearly, the usual IO code do too much for this perilous pseudo GC context. Use `FILE*` like before 5001cc47169614ea07d87651c95c2ee185e374e0 ("Optimize ObjectSpace.dump_all"). Also, add type checking for the private _dump methods. Co-authored-by: Peter Zhu <peter@peterzhu.ca> Notes: Merged: https://github.com/ruby/ruby/pull/12285
2024-12-10Fix Connection Attempt Delay of `Socket.tcp` (#12291)Misaki Shioi
The following two commits fix the proper clearing of the Connection Attempt Delay in `TCPSocket.new`. - https://github.com/ruby/ruby/pull/12087/commits/b2f610b0edf8f84d9d0fce038f3ebfa9f2cb0223 - https://github.com/ruby/ruby/pull/12223/commits/6f4efaec5352cdeb6cab86036a83f53c9fa5c3d2 The same fix will be applied to `Socket.tcp`. Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-12-09[ruby/etc] Bump up 1.4.5Hiroshi SHIBATA
https://github.com/ruby/etc/commit/5019f4314a
2024-12-09[ruby/psych] Bump up 5.2.1Hiroshi SHIBATA
https://github.com/ruby/psych/commit/7c81f7db53
2024-12-07[ruby/openssl] ssl: do not clear existing SSL options in SSLContext#set_paramsKazuki Yamaguchi
Apply SSL options set in DEFAULT_PARAMS without clearing existing options. It currently clears options in order to avoid setting one of the options included in OpenSSL::SSL::OP_ALL unless explicitly specified, namely OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS. Now that OpenSSL::SSL::OP_ALL has been removed from SSLContext#initialize, it is no longer necessary. https://github.com/ruby/openssl/commit/77c3db2d65
2024-12-07[ruby/openssl] ssl: do not enable OpenSSL::SSL::OP_ALL by defaultKazuki Yamaguchi
Respect the SSL options set by default by SSL_CTX() and by the system-wide OpenSSL configuration file. OpenSSL::SSL::SSLContext#initialize currently adds OpenSSL::SSL::OP_ALL on top of the default SSL options. Let's stop doing it. OpenSSL::SSL::OP_ALL is a set of options that changes OpenSSL's behavior to workaround various TLS implementation bugs. Using it is considered usually safe, but is not completely harmless. https://github.com/ruby/openssl/commit/00bec0d905
2024-12-07[ruby/openssl] ssl: improve documentation of SSLContext#options=Kazuki Yamaguchi
https://github.com/ruby/openssl/commit/9120fcde6a
2024-12-07[ruby/openssl] Call Init_ossl_*() functions in alphabetical orderKazuki Yamaguchi
It was originally sorted in alphabetical order, but it has been broken over time. Let's fix it. https://github.com/ruby/openssl/commit/974c67f38f
2024-12-07[ruby/openssl] Mark variables and functions as static whenever possibleKazuki Yamaguchi
https://github.com/ruby/openssl/commit/85d6b7f192
2024-12-07[ruby/openssl] ts: fix exception class raised when getting an OID nameKazuki Yamaguchi
get_asn1obj() is used by several methods in OpenSSL::Timestamp to get the string representation of an OID. On an error, such as memory allocation failure, it can raise OpenSSL::X509::AttributeError. It should be OpenSSL::Timestamp::TimestampError instead. https://github.com/ruby/openssl/commit/a424aad1df
2024-12-07[ruby/openssl] ts: avoid using OpenSSL::PKCS7's internalsKazuki Yamaguchi
Internals of OpenSSL::PKCS7 should be kept within ossl_pkcs7.c. Add a new ossl_pkcs7_new() function for duplicating and wrapping an OpenSSL PKCS7 object in OpenSSL::PKCS7. This follows the convention used by other ossl_*_new() functions. https://github.com/ruby/openssl/commit/b5f79f771e
2024-12-07[ruby/openssl] x509store: fix exception class in ↵Kazuki Yamaguchi
OpenSSL::X509::StoreContext#verify Follow-up commit https://github.com/ruby/openssl/commit/0789643d7333 (openssl: clear OpenSSL error queue before return to Ruby, 2016-05-18). It should raise OpenSSL::X509::StoreError instead of OpenSSL::X509::CertificateError. https://github.com/ruby/openssl/commit/0201f23ad6
2024-12-07[ruby/openssl] ns_spki: fix exception class in OpenSSL::Netscape::SPKI#to_derKazuki Yamaguchi
It should raise OpenSSL::Netscape::SPKIError instead of OpenSSL::X509::CertificateError. No test cases covered this because it only occurs in exceptional cases, such as memory allocation failure. https://github.com/ruby/openssl/commit/527b6101d1
2024-12-07[ruby/openssl] pkey/ec: fix exception class in OpenSSL::PKey::EC.newKazuki Yamaguchi
Fix a copy-and-paste error introduced in commit https://github.com/ruby/openssl/commit/74f6c6175688 (pkey: allocate EVP_PKEY on #initialize, 2021-04-12). It should raise OpenSSL::PKey::ECError instead of OpenSSL::PKey::DSAError. https://github.com/ruby/openssl/commit/b1f6a04abf
2024-12-07[ruby/openssl] make configs shareable when frozenHoneyryderChuck
https://github.com/ruby/openssl/commit/654cb22e21
2024-12-07[ruby/openssl] freeze OpenSSL::Config::DEFAULT_CONFIG_FILEHoneyryderChuck
https://github.com/ruby/openssl/commit/3cc1825435
2024-12-07[ruby/openssl] make config frozen on initializeHoneyryderChuck
https://github.com/ruby/openssl/commit/50599513cf
2024-12-07[ruby/openssl] ssl: handle callback exceptions in SSLSocket#sysread and ↵Kazuki Yamaguchi
#syswrite Check the ID_callback_state ivar after SSL_read() or SSL_write() returns, similar to what ossl_start_ssl() does. Previously, callbacks that can raise a Ruby exception were only called from ossl_start_ssl(). This has changed in OpenSSL 1.1.1. Particularly, the session_new_cb will be called whenever a client receives a NewSessionTicket message, which can happen at any time during a TLS 1.3 connection. https://github.com/ruby/openssl/commit/aac9ce1304
2024-12-07[ruby/openssl] ssl: fix potential exception in servername_cbKazuki Yamaguchi
ssl_servername_cb() is a callback function called from OpenSSL and Ruby exceptions must not be raised from it. Allocate the Array within rb_protect(). https://github.com/ruby/openssl/commit/3a2bf74d35
2024-12-05[ruby/json] Release 2.9.0Jean Boussier
https://github.com/ruby/json/commit/e1f6456499 Notes: Merged: https://github.com/ruby/ruby/pull/12267
2024-12-05[ruby/json] Fix generate(script_safe: true) to not confuse unrelated charactersJean Boussier
Fix: https://github.com/ruby/json/issues/715 The first byte check was missing. https://github.com/ruby/json/commit/93a7f8717d Notes: Merged: https://github.com/ruby/ruby/pull/12267
2024-12-04[ruby/psych] Do not depend on the evaluation order of C argumentsYusuke Endoh
The evaluation order of C arguments is unspecified. `RSTRING_LEN(value)` would fail if the conversion to a String by `StringValuePtr(value)` is not done yet. Coverity Scan found this issue. https://github.com/ruby/psych/commit/d1e6bf323a
2024-12-04Do not depend on the evaluation order of C argumentsYusuke Endoh
The evaluation order of C arguments is unspecified. `RSTRING_LEN(str)` would fails if the conversion to a String by `StringValuePtr` is not done yet. Coverity Scan found this issue. Notes: Merged: https://github.com/ruby/ruby/pull/12209
2024-12-03Fix use of getaddrinfo_shared->lockJohn Hawthorn
In some locations we were using shared->lock and in others &shared->lock, and we were leaking the allocated memory. Notes: Merged: https://github.com/ruby/ruby/pull/12239
2024-12-03[ruby/io-console] Bump up 0.8.0Hiroshi SHIBATA
https://github.com/ruby/io-console/commit/467508a0c6
2024-12-03[ruby/etc] Use same license files with ruby/rubyHiroshi SHIBATA
https://github.com/ruby/etc/commit/8d585ea0c9
2024-12-03[ruby/io-nonblock] Bump up 0.3.1Hiroshi SHIBATA
https://github.com/ruby/io-nonblock/commit/16727a8ab3