Bug #4956
closed
[PATCH] string.c (tr_s_bang): fix leak with heap strings
Added by normalperson (Eric Wong) over 13 years ago.
Updated over 13 years ago.
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
- 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]
Eric Wong normalperson@yhbt.net 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!
- ruby -v changed from ruby 1.9.3dev (2011-07-01 trunk 32347) [x86_64-linux] to -
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0