Live data from Hacker News

Java Hangs When Converting 2.2250738585072012e-308

exploringbinary.com

11–20 of 70 posts

Re: Java Hangs When Converting 2.2250738585072012e-308

#13
post #8

I remember when everyone was bashing PHP ( http://news.ycombinator.com/item?id=2066084 ) when they were bitten by the same issue. Then there were articles about this being maybe a GCC bug or at least design issue but people were still saying that it's PHP's duty to take care of this. I was always afraid that this might bite other environments too as the code that caused the issue in PHP was apparently taken from else…

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

Re: Java Hangs When Converting 2.2250738585072012e-308

#16
post #11

Doesnt hang Ruby 1.9 (MRI) and python 2.7 and python 3.1

Ruby 1.8.7 appears to be fine too

This particular value is specific to the Java implementation. Ruby has very similar code to PHP though, so a slight variation of the value may trigger it. You also have to be on a platform that actually has an x87, of course.

Re: Java Hangs When Converting 2.2250738585072012e-308

#17
post #9

"Konstantin reported this problem to Oracle three weeks ago, but is still waiting for a reply." This speaks volumes about Oracle as the Java's steward.

So they're not falling over themselves to fix a bug which no one has noticed for 10+ years, and which hardly anyone is going to hit in actual use. Maybe they're spending their time fixing problems which are actually affecting developers.

Re: Java Hangs When Converting 2.2250738585072012e-308

#18
post #17
post #9

"Konstantin reported this problem to Oracle three weeks ago, but is still waiting for a reply." This speaks volumes about Oracle as the Java's steward.

So they're not falling over themselves to fix a bug which no one has noticed for 10+ years, and which hardly anyone is going to hit in actual use. Maybe they're spending their time fixing problems which are actually affecting developers.

Any public-facing Java server affected by this bug that accepts floating point numbers from the user as a string can be hung by this bug.

This is going to be a big problem.

Re: Java Hangs When Converting 2.2250738585072012e-308

#19
I assume this hits Clojure, JRuby, etc. harder because it affects all values which are converted to Strings, but only affects Java when one explicitly converts to Double?

So when a (Java) website expects an Int as input, it's not affected, but Clojure,JRuby etc would be?

Am I right, what am I missing?

(see the comment with

user=> (def d 2.2250738585072012e-308)

)

Re: Java Hangs When Converting 2.2250738585072012e-308

#20
post #8

I remember when everyone was bashing PHP ( http://news.ycombinator.com/item?id=2066084 ) when they were bitten by the same issue. Then there were articles about this being maybe a GCC bug or at least design issue but people were still saying that it's PHP's duty to take care of this. I was always afraid that this might bite other environments too as the code that caused the issue in PHP was apparently taken from else…

Yes, astonishing how Oracle (and others) didn't check their code when this surfaced in PHP to determine if they are affected too.
Post reply on HN