1100288eba
Attempting to escape large, untrusted strings cause stack overflows (easier under Ruby 1.9 using pthreads) leading to SystemStackError on small overflows and segmentation faults on large overflows. Instead of allocating on the stack, we'll allocate a string buffer from the heap. This has the unfortunate effect of reducing escape performance for common cases, but in my experience SQL escaping isn't much of a bottleneck. For reference, Ruby 1.9.2-p0 with pthreads gets a stack size of 512K and the default process stack size is 8MB on both x86 and x86_64 Linux. |
||
---|---|---|
.. | ||
em | ||
mysql2 | ||
rcov.opts | ||
spec_helper.rb | ||
spec.opts |