[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66543] [ruby-trunk - Bug #10223] Stack level too deep in CSV when parsing long line
From:
usa@...
Date:
2014-11-28 07:34:45 UTC
List:
ruby-core #66543
Issue #10223 has been updated by Usaku NAKAMURA.
How did you make `Closed`, nobu?
----------------------------------------
Bug #10223: Stack level too deep in CSV when parsing long line
https://bugs.ruby-lang.org/issues/10223#change-50158
* Author: Aleksander Pohl
* Status: Closed
* Priority: Normal
* Assignee:
* Category: core
* Target version: current: 2.2.0
* ruby -v: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux], ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED
----------------------------------------
The following code:
~~~ruby
#!/usr/bin/env ruby
# encoding: utf-8
require 'bundler/setup'
require 'csv'
CSV.open("csv_error.csv") do |input|
input.each do |category,*mappings|
# do nothing
end
end
~~~
with the data file attached causes the follwing error:
~~~
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/csv.rb:1768: stack level too deep (SystemStackError)
~~~
Interestingly almost the same code:
~~~ruby
#!/usr/bin/env ruby
# encoding: utf-8
require 'bundler/setup'
require 'csv'
CSV.open("csv_error.csv") do |input|
input.each do |tuple|
# do nothing
end
end
~~~
works fine. The error appears both in Ruby 1.9.2 (ancient) and Ruby 2.1.2. So I suppose it is an error inside CSV lib.
This might be important for any developer parsing CSV files comming from the outside world, since it may cause DOS error.
---Files--------------------------------
csv_error.csv (2.1 MB)
--
https://bugs.ruby-lang.org/