Date | Commit message (Collapse) |
|
"to_s" is not guaranteed to return a string and calling
RSTRING_ macros on them blindly can cause bus errors/segfaults.
Found by nobu: [ruby-core:38867]
|
|
We need to guard temporary strings from being collected while we
append to the JSON buffer (which may allocate memory). The
RSTRING_PAIR macro is dangerous since it preserves no pointer to
the original string VALUE, allowing GC to reap the object while
we're still using the (C) string pointer.
The included test case shows data corruption with large
Bignums without this fix.
|
|
|
|
|
|
|
|
|
|
|
|
use state for depth checking in pure as well
|
|
|
|
Merged in some additional features from the v1.2 branch.
|
|
|
|
|
|
|
|
|
|
fast_generate now defaults to throwing an exception if an infinite or
nan float is encountered. This is the same behaviour as in generate and
pretty_generate. (Fix for http://github.com/flori/json/issues#issue/3)
|
|
|