Project

General

Profile

Actions

Bug #21173

closed

RUBY_FREE_AT_EXIT does not work when error in -r

Added by peterzhu2118 (Peter Zhu) 24 days ago. Updated 10 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:121247]

Description

PR: https://github.com/ruby/ruby/pull/12859

When loading a file using the command line -r, it is processed before RUBY_FREE_AT_EXIT is checked. So if the loaded file raises an error, it will cause memory to not be freed with RUBY_FREE_AT_EXIT.

For example ruby -rtest.rb -e "" will report a large amount of memory leaks if test.rb raises.

Actions #1

Updated by peterzhu2118 (Peter Zhu) 23 days ago

  • Status changed from Open to Closed

Applied in changeset git|6bad47ac6d62b54fe30e3f161c2a9d8f5fa4800c.


RUBY_FREE_AT_EXIT does not work when error in -r

[Bug #21173]

When loading a file using the command line -r, it is processed before
RUBY_FREE_AT_EXIT is checked. So if the loaded file raises an error, it
will cause memory to not be freed with RUBY_FREE_AT_EXIT.

For example ruby -rtest.rb -e "" will report a large amount of memory
leaks if test.rb raises.

Updated by tenderlovemaking (Aaron Patterson) 10 days ago

  • Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE

Backported in 762e76cc50db059e71d1f6c13674103a488f5171

Actions

Also available in: Atom PDF

Like0
Like0Like0