Re:Java Hangs When Converting 2.2250738585072012e-308
by djacobs on Tuesday February 01, 2011 @10:52AM
(#2165896)
Maybe I'm dense, but why does this affect apps that use JSON?
[ Parent
| on HN ]
Re:Java Hangs When Converting 2.2250738585072012e-308
by snewman on Tuesday February 01, 2011 @11:41AM
(#2166111)
Because JSON can include floating-point numbers. If you pass { foo: 2.2250738585072012e-308 } to any JSON service, I'd expect it to invoke Double.parseDouble(...) as part of its input processing, and trip over the bug. This would probably occur before any type checking of the input, and thus would probably work even for a service which does not expect floating-point inputs.
Re:Java Hangs When Converting 2.2250738585072012e-308
by woogley on Tuesday February 01, 2011 @01:45PM
(#2166683)
This is not correct. Think about a service which used PHP's json_decode function. PHP has fixed this bug, so there would be no issue.
The problem has nothing to do with JSON. It only affects JSON parsers that run on a JVM.
Re:Java Hangs When Converting 2.2250738585072012e-308
by snewman on Tuesday February 01, 2011 @04:23PM
(#2167471)
Right -- when I said "any service that accepts JSON input", I meant "any JVM-based service that accepts JSON input". I thought the JVM qualification would be clear from the context of this thread, apologies if it wasn't.