Issue #19761 has been reported by nobu (Nobuyoshi Nakada).
----------------------------------------
Bug #19761: AddressSanitizer fails with Thread and Process
https://bugs.ruby-lang.org/issues/19761
* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
With AddressSanitizer on macOS, this code crashes.
```ruby
system('')
Thread.new {}
300_000.times do
String.new(capacity: 1000)
end
```
```
==62870==ERROR: AddressSanitizer failed to deallocate 0x8000 (32768) bytes at address 0x62d00000a400
AddressSanitizer: CHECK failed: sanitizer_posix.cpp:61 "(("unable to unmap" && 0)) != (0)" (0x0, 0x0) (tid=857549)
<empty stack>
Assertion Failed: ../debug/vm_core.h:1853:rb_current_execution_context:!expect_ec || ec != NULL
ruby 3.3.0dev (2023-07-08T02:54:37Z tmp 0083edc3a0) [x86_64-darwin22]
-- Crash Report log information --------------------------------------------
See Crash Report log file in one of the following locations:
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
Don't forget to include the above Crash Report log file in bug reports.
-- C level backtrace information -------------------------------------------
```
--
https://bugs.ruby-lang.org/
Issue #19770 has been reported by Schachi65 (Joachim Schachermayer).
----------------------------------------
Bug #19770: TLS / Certificate Hostname Verification against IP fails with "address family must be specified"
https://bugs.ruby-lang.org/issues/19770
* Author: Schachi65 (Joachim Schachermayer)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.4
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
I dont't use Ruby directly but indirectly via Fluentd-1.16.1 (https://www.fluentd.org/). Fluentd uses Ruby 3.1.4.
The problem is, that a TLS connection from a Fluentd Client to a Fluentd Server fails, if the connection is established using the IP address of the server and tls_verify_hostname is switched to on. In the servers certificate, in the SubjectAlternativeNames extention, there is the servers IP address set with the correct value. I get the error message " **address family must be specified** ".
**Probable cause** :
ext/openssl/lib/openssl/ **ssl.rb** line 288:
Here the Methode IPAddr.new(hostname) is called with just one argument:
return true if san.value == IPAddr.new( **hostname** ).hton
lib/ **ipaddr.rb** line 594:
Here the exception is raised with the observed error message:
when Socket::AF_UNSPEC
**raise** AddressFamilyError, " **address family must be specified** "
The exception is raised, because the variable "family" has the value " **Socket::AF_UNSPEC** " because thats the default value of "family" if there is no additional parameter in the call to "initialize()".
The documumentation of "initialize()" says in line 575/576/577: "Although the address family is determined automatically from a specified string, you can specify one explicitly by the optional second argument."
But that automatic address determination is done too late. If no second parameter is given, it is not done at all because that exception is raised (assumption: the addr i always a string).
**Probable solution** :
If the address family is set to Socket::AF_UNSPEC with the call of "initialize()", dont't raise an exception now but do the in the comment announced automatic adress family detection here.
--
https://bugs.ruby-lang.org/
Issue #19791 has been reported by stuartb (Stuart Bury).
----------------------------------------
Bug #19791: Debugger does not handle delete key correctly
https://bugs.ruby-lang.org/issues/19791
* Author: stuartb (Stuart Bury)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux-musl]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
When entering the debugger using `binding.debugger` or the `rdbg` command, pressing the delete key on the keyboard to delete characters at the REPL merely prints "^[[3~" to the console, and does not actually delete anything. This is **very** inconvenient. Can this be fixed somehow? I really like the new debugger, but my swearing like a sailor every time I hit "delete" is starting to really annoy my wife...
It is worth noting that if I run the `pry` command and then, within pry, call `binding.debugger`, the delete key operates correctly.
I believe the issue is related in some way to readline support, or the lack thereof – but my Ruby installation was compiled with readline support. I've tried everything I can think of, and spent some time on Google trying to solve it, but the problem remains. It happens in Alpine 3.18 and also in Debian 12.
--
https://bugs.ruby-lang.org/
Issue #19836 has been reported by peterzhu2118 (Peter Zhu).
----------------------------------------
Bug #19836: Parser leaks memory for incomplete lambdas
https://bugs.ruby-lang.org/issues/19836
* Author: peterzhu2118 (Peter Zhu)
* Status: Open
* Priority: Normal
* Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED
----------------------------------------
GitHub Pull Request: https://github.com/ruby/ruby/pull/8192
The parser does not free the chain of `struct vtable`, which causes memory leaks.
The following script reproduces this issue:
```ruby
10.times do
100_000.times do
Ripper.parse("-> {")
end
puts `ps -o rss= -p #{$$}`
end
```
--
https://bugs.ruby-lang.org/
Issue #19835 has been reported by peterzhu2118 (Peter Zhu).
----------------------------------------
Bug #19835: Parser leaks memory for incomplete tokens
https://bugs.ruby-lang.org/issues/19835
* Author: peterzhu2118 (Peter Zhu)
* Status: Open
* Priority: Normal
* Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED
----------------------------------------
GitHub Pull Request: https://github.com/ruby/ruby/pull/8192
The parser does not free the `tbl` of the `struct vtable` when there are leftover `lvtbl` in the parser. This causes a memory leak.
The following script reproduces this issue:
```ruby
10.times do
100_000.times do
Ripper.parse("class Foo")
end
puts `ps -o rss= -p #{$$}`
end
```
--
https://bugs.ruby-lang.org/
Issue #19833 has been reported by ksss (Yuki Kurihara).
----------------------------------------
Bug #19833: Superclass of BasicObject is broken.
https://bugs.ruby-lang.org/issues/19833
* Author: ksss (Yuki Kurihara)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0dev (2023-08-08T00:21:45Z master 69292676a2) [arm64-darwin22]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
I encountered a phenomenon where a non-class object appeared in the superclass of BasicObject.
The minimum reproduction code is below.
```rb
module Mod
end
BasicObject.include Mod
# or BasicObject.prepend Mod
p BasicObject.superclass
#=> 2431129 or false
```
I think it is a practical problem because I found it by running code that monitors `singleton_method_added` as follows.
https://github.com/ksss/orthoses/blob/341019c78ba625bc5d36c0f359c7d88621990…
--
https://bugs.ruby-lang.org/
Issue #19793 has been reported by sczimmer (Scott Zimmermann).
----------------------------------------
Bug #19793: Segmentation fault with large arrays
https://bugs.ruby-lang.org/issues/19793
* Author: sczimmer (Scott Zimmermann)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [aarch64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
I was doing ruby koans to learn ruby and I got a segmentation fault when it gets to the part where it uses `Symbol.all_symbols`. I realized it happens with any large Array, but I cannot reproduce in a small test script, just when it runs the whole ruby koans. So the minimal way to reproduce I have is:
download rubykoans: https://github.com/edgecase/ruby_koans/blob/master/download/rubykoans.zip?r…
```
unzip rubykoans.zip
cd koans
# fix deprecated method call for ruby 3.2
ruby -i -pe 'sub "File.exists", "File.exist"' neo.rb
```
Edit about_asserts.rb, adding these two statements to make a big array to the first koan:
```
def test_assert_truth
array = []
99130.times { array << "a string"}
assert false # This should be true
end
```
run `ruby path_to_enlightenment.rb` and get a backtrace like the attached backtrace.txt
I've tried this on two servers, ubuntu aarch64 and debian x86_64. On both it crashes with ruby 3.2.2 and works fine with ruby 3.1. On both I installed ruby built from source with RVM. On the server with more ram I had to increase the number more (above it's 99130) to get it to crash.
---Files--------------------------------
backtrace.txt (21.7 KB)
--
https://bugs.ruby-lang.org/
Issue #19834 has been reported by ramachandran(a)mallow-tech.com (Ramachandran A).
----------------------------------------
Bug #19834: Segmentation fault while running in docker
https://bugs.ruby-lang.org/issues/19834
* Author: ramachandran(a)mallow-tech.com (Ramachandran A)
* Status: Open
* Priority: Normal
* ruby -v: 2.6.3
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```
2023-08-09 12:44:32 /usr/local/lib/ruby/2.6.0/openssl/buffering.rb:383: [BUG] Illegal instruction at 0x0000ffff90d911a0
2023-08-09 12:44:32 ruby 2.6.3p62 (2019-04-16 revision 67580) [aarch64-linux]
2023-08-09 12:44:32
2023-08-09 12:44:32 -- Control frame information -----------------------------------------------
2023-08-09 12:44:32 c:0046 p:---- s:0274 e:000273 CFUNC :syswrite_nonblock
2023-08-09 12:44:32 c:0045 p:0013 s:0268 e:000267 METHOD /usr/local/lib/ruby/2.6.0/openssl/buffering.rb:383
2023-08-09 12:44:32 c:0044 p:0021 s:0261 e:000260 BLOCK /usr/local/lib/ruby/2.6.0/net/protocol.rb:277 [FINISH]
2023-08-09 12:44:32 c:0043 p:---- s:0253 e:000252 IFUNC
2023-08-09 12:44:32 c:0042 p:---- s:0250 e:000249 CFUNC :each
2023-08-09 12:44:32 c:0041 p:---- s:0247 e:000246 CFUNC :each_with_index
```
I am using Ruby 2.6.3 in my project. It works fine until this week, I don't know why this is occurring. I have tried the solution mentioned in https://bugs.ruby-lang.org/issues/18555#note-6 the above issue, but it doesn't solve my problem.
--
https://bugs.ruby-lang.org/