Project

General

Profile

Actions

Bug #8864

closed

sprintf segfaults with too high precision

Added by Aaronneyer (Aaron Neyer) about 11 years ago. Updated about 11 years ago.

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

Description

In any Ruby version (attempted with 1.8.7, 1.9.3, and 2.0.0), specifying a very large precision in sprintf can cause a segmentation fault.

The following code will cause the segmentation fault.

"%.99999f" % 10

The number to cause a segfault is dependent on the system. On my laptop, any number above 1100 would cause it, and on an EC2 micro instance, around 2500 was the limit.


Files

vsnprintf.patch (1.39 KB) vsnprintf.patch phasis68 (Heesob Park), 09/12/2013 07:44 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0