Ruby 2.1 frozen string DoS? 1000000000000.times { |n| eval "'#{n}'f" }
-
-
@bascule@tenderlove frozen strings are GC'd: https://github.com/ruby/ruby/blob/trunk/string.c#L875-878 … -
@charliesome@tenderlove@fuadsaud are you sure that happens in this case? https://gist.github.com/tarcieri/6708317 … -
@bascule@tenderlove@fuadsaud it won't happen there because the executing iseq holds a reference to the frozen string object -
@charliesome@tenderlove@fuadsaud my original example doesn't GC: http://i.imgur.com/cGGGgWs.png -
@bascule@tenderlove@fuadsaud seems to GC just fine for me :\ -
@charliesome@tenderlove@fuadsaud try this: 1000000000000.times { |n| eval "'#{'X' * 10000000}#{n}'f" } -
@bascule@tenderlove@fuadsaud seems to just be that ruby isn't GCing enough. Sticking a 'GC.start' at the end of the block fixes it for me -
@charliesome@tenderlove@fuadsaud you repoed it without the GC.start though? - 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.