Project

General

Profile

Actions

Bug #4956

closed

[PATCH] string.c (tr_s_bang): fix leak with heap strings

Added by normalperson (Eric Wong) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
-
Backport:
[ruby-core:37708]

Description

Trivially reproduced with:

loop { "this string is too long to embed".tr_s!(" \t\r\n\f", " ") }

This also affects Ruby 1.9.2-p180


Files

0001-string.c-tr_s_bang-fix-leak-with-heap-strings.patch (757 Bytes) 0001-string.c-tr_s_bang-fix-leak-with-heap-strings.patch normalperson (Eric Wong), 07/01/2011 11:21 AM
noname (500 Bytes) noname tenderlovemaking (Aaron Patterson), 07/06/2011 05:59 AM
noname (500 Bytes) noname tenderlovemaking (Aaron Patterson), 07/06/2011 07:23 AM
Actions #1

Updated by naruse (Yui NARUSE) over 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r32349.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • string.c (tr_trans): free heap ptr when the str is not embeded.
    patched by Eric Wong. [Bug #4956] [ruby-core:37708]

Updated by normalperson (Eric Wong) over 12 years ago

Eric Wong wrote:

This also affects Ruby 1.9.2-p180

Now this is in trunk, can we also get this backported to the 1.9.2
branch? Thanks!

Updated by tenderlovemaking (Aaron Patterson) over 12 years ago

  • ruby -v changed from ruby 1.9.3dev (2011-07-01 trunk 32347) [x86_64-linux] to -

On Wed, Jul 06, 2011 at 04:46:44AM +0900, Eric Wong wrote:

Eric Wong wrote:

This also affects Ruby 1.9.2-p180

Now this is in trunk, can we also get this backported to the 1.9.2
branch? Thanks!

I suggest opening a backport ticket to ease yugui's job:

http://redmine.ruby-lang.org/projects/ruby-192/issues?set_filter=1&tracker_id=4

--
Aaron Patterson
http://tenderlovemaking.com/

Updated by normalperson (Eric Wong) over 12 years ago

Aaron Patterson wrote:

I suggest opening a backport ticket to ease yugui's job:

http://redmine.ruby-lang.org/projects/ruby-192/issues?set_filter=1&tracker_id=4

I've considered opening backport tickets in the past, but
http://redmine.ruby-lang.org/projects/ruby-192 says:

"Don't report issues here"

--
Eric Wong

Updated by tenderlovemaking (Aaron Patterson) over 12 years ago

On Wed, Jul 06, 2011 at 06:29:24AM +0900, Eric Wong wrote:

Aaron Patterson wrote:

I suggest opening a backport ticket to ease yugui's job:

http://redmine.ruby-lang.org/projects/ruby-192/issues?set_filter=1&tracker_id=4

I've considered opening backport tickets in the past, but
http://redmine.ruby-lang.org/projects/ruby-192 says:

"Don't report issues here"

Ya, I think that should be worded like "Don't report bugs here" or
something. Whenever I commit things that need to be backported, I file
a ticket there so yugui knows the revisions I want backported so that
she doesn't have to review every commit to trunk.

--
Aaron Patterson
http://tenderlovemaking.com/

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0