[#118346] [Ruby master Bug#20586] Some filesystem calls in dir.c are missing error handling and can return incorrect results if interrupted — "ivoanjo (Ivo Anjo) via ruby-core" <ruby-core@...>
Issue #20586 has been reported by ivoanjo (Ivo Anjo).
13 messages
2024/06/19
[ruby-core:118155] [Ruby master Bug#20521] Memory leak in Ripper parsing
From:
"ufuk (Ufuk Kayserilioglu) via ruby-core" <ruby-core@...>
Date:
2024-06-03 17:00:41 UTC
List:
ruby-core #118155
Issue #20521 has been updated by ufuk (Ufuk Kayserilioglu).
Probably related to https://bugs.ruby-lang.org/issues/19835
----------------------------------------
Bug #20521: Memory leak in Ripper parsing
https://bugs.ruby-lang.org/issues/20521#change-108593
* Author: kddnewton (Kevin Newton)
* Status: Open
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Currently, this code is leaking:
```ruby
require "ripper"
source = <<~'RUBY'
<<-A; %w[j\
i
A
j]
RUBY
10.times do
100_000.times do
Ripper.sexp_raw(source)
end
puts `ps -o rss= -p #{$$}`
end
```
This results in:
```
31584
36304
41504
47008
51712
56384
61088
65792
70480
75200
```
I haven't managed to track it down, but I can see that 3.2.2 does not leak but 3.3.0 does leak.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/