| Age | Commit message (Collapse) | Author |
|
to prevent the following scenario:
1. `delete_unique_str()` can be called while GC (sweeping)
2. it calls `st_insert()` to decrement the counter
3. `st_insert()` can try to extend the table even if the key exists
4. `xmalloc` while GC and cause BUG
Notes:
Merged: https://github.com/ruby/ruby/pull/12407
|
|
https://github.com/ruby/openssl/commit/e5153dbbb4
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
OpenSSL::Digest#finish overrides Digest::Instance#finish and is called
from the Digest::Class framework in the digest library. This method is
not supposed to take any arguments, as suggested by the RDoc comment for
Digest::Instance#finish.
It is a private method and not exposed to users. Let's remove it.
This optional parameter exists since r15602 in Ruby trunk, the commit
which converted OpenSSL::Digest to a subclass of Digest::Class.
https://github.com/ruby/openssl/commit/dcb2a4f30b
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
Likewise, OpenSSL::Digest#finish needs to make the output buffer
independent before writing to it.
https://github.com/ruby/openssl/commit/9cc8a83466
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
OpenSSL::Cipher#update accepts a String as the second argument to be
used as the output buffer. The buffer must be directly writable, in
other words, it must not be frozen and not a shared string.
rb_str_resize() does not make the String independent if the String
already has the intended length. Use the rb_str_modify() family instead
to check it.
Fixes: https://bugs.ruby-lang.org/issues/20937
https://github.com/ruby/openssl/commit/1de3b80a46
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
Add a binding for PKCS12_set_mac() to set MAC parameters and
(re-)calculate MAC for the content.
This allows generating PKCS #12 with consistent MAC parameters with
different OpenSSL versions. OpenSSL 3.0 changed the default hash
function used for HMAC and the KDF from SHA-1 to SHA-256.
Fixes: https://github.com/ruby/openssl/issues/772
https://github.com/ruby/openssl/commit/f5ed2a74b6
Notes:
Merged: https://github.com/ruby/ruby/pull/12421
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12385
|
|
https://github.com/ruby/json/commit/f745ec145e
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
Check for existence of strnlen() and use alternative code if it is missing.
https://github.com/ruby/json/commit/48d4bbc3a0
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
https://github.com/ruby/psych/commit/746e1ad24d
|
|
Wrap `do_fast_fallback_getaddrinfo` with `rb_thread_prevent_fork`
Referencing PR #10864,
wrap `do_fast_fallback_getaddrinfo` with `rb_thread_prevent_fork`
to avoid fork safety issues.
`do_fast_fallback_getaddrinfo` internally uses getaddrinfo(3),
leading to fork safety issues, as described in PR #10864.
This change ensures that `do_fast_fallback_getaddrinfo`
is guarded by `rb_thread_prevent_fork`,
preventing fork during its execution and avoiding related issues.
Notes:
Merged-By: shioimm <shioi.mm@gmail.com>
|
|
https://github.com/ruby/win32ole/commit/3e9b3b02e9
|
|
When reference updating ObjectSpace.trace_object_allocations, we need to
check whether the object is valid or not because it does not mark the
object so the object may be dead. This can cause a segmentation fault
if the object is on a free heap page.
For example, the following script crashes:
require "objspace"
objs = []
ObjectSpace.trace_object_allocations do
1_000_000.times do
objs << Object.new
end
end
objs = nil
# Free pages that the objs were on
GC.start
# Run compaction and check that it doesn't crash
GC.compact
Notes:
Merged: https://github.com/ruby/ruby/pull/12360
|
|
We need to reinsert into the ST table when an object moves because it is
a numtable that hashes on the object address, so when an object moves we
need to reinsert it rather than just updating the key.
Notes:
Merged: https://github.com/ruby/ruby/pull/12339
|
|
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
|
|
https://docs.ruby-lang.org/en/master/Psych.html#module-Psych-label-Exception+handling
https://github.com/ruby/psych/commit/c53c298222
|
|
https://github.com/ruby/digest/commit/26c757fe9a
|
|
|
|
(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>
|
|
(https://github.com/ruby/strscan/pull/126)
Split off from https://github.com/ruby/ruby/pull/12322
https://github.com/ruby/strscan/commit/9bee37e0f5
|
|
https://github.com/ruby/strscan/commit/fd140b8582
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12350
|
|
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
|
|
https://github.com/ruby/date/commit/cb52e64be1
|
|
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>
|
|
|
|
https://github.com/ruby/zlib/commit/d2e29b23c8
|
|
https://github.com/ruby/win32ole/commit/eaa1507262
|
|
RDoc
https://github.com/ruby/win32ole/commit/99e1ea403f
|
|
https://github.com/ruby/win32ole/commit/542d39372c
|
|
|
|
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
|
|
* 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>
|
|
https://github.com/ruby/digest/commit/d19c84fd68
|
|
GitHub: fix https://github.com/ruby/fiddle/pull/166
Arch Linux's libncurses.so uses this style.
https://github.com/ruby/fiddle/commit/77d3dc934f
|
|
FFI backend
(https://github.com/ruby/fiddle/pull/165)
https://github.com/ruby/fiddle/commit/0bd963d3b8
|
|
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
|
|
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
|
|
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>
|
|
https://github.com/ruby/etc/commit/5019f4314a
|
|
https://github.com/ruby/psych/commit/7c81f7db53
|
|
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
|
|
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
|
|
https://github.com/ruby/openssl/commit/9120fcde6a
|
|
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
|
|
https://github.com/ruby/openssl/commit/85d6b7f192
|
|
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
|
|
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
|
|
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
|
|
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
|