Earlier quoted context omitted.
Maybe I'm dense, but why does this affect apps that use JSON?
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.
Java Hangs When Converting 2.2250738585072012e-308
51–60 of 70 posts
Re: Java Hangs When Converting 2.2250738585072012e-308
#52Earlier quoted context omitted.
Rasmus just tweeted about it: Java's turn to deal with the x87 register issue. Here's a hint Oracle, "volatile" http://twitter.com/rasmus/status/32365768603602944
Rasmussen's hint would work were the number parsing in Oracle's JDK implemented in in C. Volatile keyword in Java does not guarantee writing to memory and reading it back ( http://java.sun.com/docs/books/jls/third_edition/html/classe... ), but using strictfp as a modifier to the method should cause the usage of strict IEEE 64-bit floating point.
Re: Java Hangs When Converting 2.2250738585072012e-308
#53Earlier quoted context omitted.
I tried to dig up a list of websites with a java-backend but my google-fu is not strong enough. I don't think that there are actually many big sites running on java.
There are tons of sites running on java. Possibly more than php.
Re: Java Hangs When Converting 2.2250738585072012e-308
#54The compiler one is pretty neat. Hung IntelliJ. Didn't hang VS.NET. Had both open, had to try.
This hangs eclipse 3.5.2 when saving the code :)
Don't try this in a project you're currently working on. Now I have to spend my morning trying to unfuck my project.
Re: Java Hangs When Converting 2.2250738585072012e-308
#55Earlier quoted context omitted.
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.
So the exact same bug affects Javascript?
Re: Java Hangs When Converting 2.2250738585072012e-308
#56Earlier quoted context omitted.
There are tons of sites running on java. Possibly more than php.
Most of internet banking systems in my country run on Java. And most of them can be affected if you know where to put this number.
Re: Java Hangs When Converting 2.2250738585072012e-308
#57Earlier quoted context omitted.
Maybe I'm dense, but why does this affect apps that use JSON?
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.
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
#58Re: Java Hangs When Converting 2.2250738585072012e-308
#59Re: Java Hangs When Converting 2.2250738585072012e-308
#60What about android?
Android is not i386 based and this is x87 FPU and gcc specific bug in commonly used atod() implementation, so I assume that this does not happen on Android.