You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org> on 2011/02/04 10:42:27 UTC

[jira] Created: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

MyFaces hangs when converting 2.2250738585072012e-308
-----------------------------------------------------

                 Key: MYFACES-3024
                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
             Project: MyFaces Core
          Issue Type: Bug
            Reporter: Matthias Weßendorf


I read
http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/

Nice! and it even works with JSF :-)

Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).

Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Re: [jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by Werner Punz <we...@gmail.com>.
Yes +1

Werner


Am 04.02.11 17:26, schrieb Matthias Weßendorf (JIRA):
>
>      [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990603#comment-12990603 ]
>
> Matthias Weßendorf commented on MYFACES-3024:
> ---------------------------------------------
>
> Yes! The sooner - the better!! :-)
>
>> MyFaces hangs when converting 2.2250738585072012e-308
>> -----------------------------------------------------
>>
>>                  Key: MYFACES-3024
>>                  URL: https://issues.apache.org/jira/browse/MYFACES-3024
>>              Project: MyFaces Core
>>           Issue Type: Bug
>>             Reporter: Matthias Weßendorf
>>             Priority: Critical
>>
>> I read
>> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
>> Nice! and it even works with JSF :-)
>> Looking at the MyFaces (double) converter, I see "Double.valueOf()"
>> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
>> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
>> Sweet!
>



[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990501#comment-12990501 ] 

Werner Punz commented on MYFACES-3024:
--------------------------------------

If it was the only bad boy we easily can work around that jvm bug, if not, oh well... 

For the time being I would recommend to splice that bad boy into two smaller numbers and then sum them up on the float side.


> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990953#comment-12990953 ] 

Mark Struberg commented on MYFACES-3024:
----------------------------------------

I fear that the tomcat fix will not help us. We really need to convert whereas tomcat just needed to fix a very specific Locale quality sorting problem.

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990495#comment-12990495 ] 

Matthias Weßendorf commented on MYFACES-3024:
---------------------------------------------

I am not (yet) sure if the above "string" is the only bad boy - or if there are slightly different variations of it .....

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990945#comment-12990945 ] 

Matthias Weßendorf commented on MYFACES-3024:
---------------------------------------------

Go! :-)

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Brian Tinnel (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007117#comment-13007117 ] 

Brian Tinnel commented on MYFACES-3024:
---------------------------------------

Just FYI, The problem occurs for any number supplied in the range of 2^(-1022) – 2^(-1075) and 2^(-1022) – 2^(-1076).  The analysis above states that superfluous characters after the 17th digit do not matter and included an example of 2.2250738585072012497800001e-308 , however the extra characters do matter, it is just that the example is not in the range that causes the issue to happen. Try values like 2.2250738585072012497800001e-308 or 2.2250738585072011997800001e-308 that are within the range and the same looping condition will occur.


> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Assignee: Mark Struberg
>            Priority: Critical
>             Fix For: 2.0.4
>
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990941#comment-12990941 ] 

Mark Struberg commented on MYFACES-3024:
----------------------------------------

I'll go on with kind of pragmatism ;) I saw that Mark Thomas already fixed this issue in tomcat, so I will just look at his code and reuse the parts he did. Think that is the best thing we can do quickly.

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Resolved: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved MYFACES-3024.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.4-SNAPSHOT
         Assignee: Mark Struberg

fixed in DoubleConverter.java. Please review and if needed also add further tests to DoubleConverterTest.java!

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Assignee: Mark Struberg
>            Priority: Critical
>             Fix For: 2.0.4-SNAPSHOT
>
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990946#comment-12990946 ] 

Mark Struberg commented on MYFACES-3024:
----------------------------------------

first need to fully understand what they did ;)
Off to the supermarket before that...

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990603#comment-12990603 ] 

Matthias Weßendorf commented on MYFACES-3024:
---------------------------------------------

Yes! The sooner - the better!! :-)

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990688#comment-12990688 ] 

Werner Punz commented on MYFACES-3024:
--------------------------------------

Actually there seems to be a certain digit pattern in every of those numbers, 2250738585072012, with a leading 2 as first non zero digit my personal guess is the workaround fix
for this issue is to break this pattern one way or the other and split it into two separate values which then should be readded on native double level.


> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Re: [jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by Matthias Wessendorf <ma...@apache.org>.
On Saturday, February 5, 2011, Mark Struberg <st...@yahoo.de> wrote:
> already searching their bugzilla for the commit since 10 minutes ^^

Goto dev@ and ask, that's simpler :-)


> Bugzilla is SUCH a pita...

+1


>
> LieGrue,
> strub
>
> --- On Sat, 2/5/11, Matthias Weßendorf (JIRA) <de...@myfaces.apache.org> wrote:
>
>> From: Matthias Weßendorf (JIRA) <de...@myfaces.apache.org>
>> Subject: [jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308
>> To: dev@myfaces.apache.org
>> Date: Saturday, February 5, 2011, 9:10 AM
>>
>>     [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990942#comment-12990942
>> ]
>>
>> Matthias Weßendorf commented on MYFACES-3024:
>> ---------------------------------------------
>>
>> Tomcat fixed it in their src; we could look there:
>> https://twitter.com/theapachetomcat/status/33771766316793856
>>
>>
>>
>> > MyFaces hangs when converting 2.2250738585072012e-308
>> > -----------------------------------------------------
>> >
>> >
>>    Key: MYFACES-3024
>> >
>>    URL: https://issues.apache.org/jira/browse/MYFACES-3024
>> >
>>    Project: MyFaces Core
>> >          Issue Type: Bug
>> >            Reporter:
>> Matthias Weßendorf
>> >            Priority:
>> Critical
>> >
>> > I read
>> > http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
>> > Nice! and it even works with JSF :-)
>> > Looking at the MyFaces (double) converter, I see
>> "Double.valueOf()"
>> > Now, I did a quick check, with Trinidad (disabled
>> client-side validation) and MyFaces (since Trinidad calls
>> super.getAsObject()).
>> > Entering "2.2250738585072012e-308" into a field, that
>> has a double converter is keeping my JVM _really_ busy ! :)
>> > Sweet!
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>>
>
>
>
>

-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Re: [jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by Mark Struberg <st...@yahoo.de>.
already searching their bugzilla for the commit since 10 minutes ^^ 
Bugzilla is SUCH a pita...

LieGrue,
strub

--- On Sat, 2/5/11, Matthias Weßendorf (JIRA) <de...@myfaces.apache.org> wrote:

> From: Matthias Weßendorf (JIRA) <de...@myfaces.apache.org>
> Subject: [jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308
> To: dev@myfaces.apache.org
> Date: Saturday, February 5, 2011, 9:10 AM
> 
>     [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990942#comment-12990942
> ] 
> 
> Matthias Weßendorf commented on MYFACES-3024:
> ---------------------------------------------
> 
> Tomcat fixed it in their src; we could look there:
> https://twitter.com/theapachetomcat/status/33771766316793856
> 
> 
> 
> > MyFaces hangs when converting 2.2250738585072012e-308
> > -----------------------------------------------------
> >
> >             
>    Key: MYFACES-3024
> >             
>    URL: https://issues.apache.org/jira/browse/MYFACES-3024
> >         
>    Project: MyFaces Core
> >          Issue Type: Bug
> >            Reporter:
> Matthias Weßendorf
> >            Priority:
> Critical
> >
> > I read
> > http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> > Nice! and it even works with JSF :-)
> > Looking at the MyFaces (double) converter, I see
> "Double.valueOf()" 
> > Now, I did a quick check, with Trinidad (disabled
> client-side validation) and MyFaces (since Trinidad calls
> super.getAsObject()).
> > Entering "2.2250738585072012e-308" into a field, that
> has a double converter is keeping my JVM _really_ busy ! :)
> > Sweet!
> 
> -- 
> This message is automatically generated by JIRA.
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> 
> 
> 


      

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990942#comment-12990942 ] 

Matthias Weßendorf commented on MYFACES-3024:
---------------------------------------------

Tomcat fixed it in their src; we could look there:
https://twitter.com/theapachetomcat/status/33771766316793856



> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Andy Schwartz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990670#comment-12990670 ] 

Andy Schwartz commented on MYFACES-3024:
----------------------------------------

There is an addendum to the original article that mentions that equivalent forms of the same value also trigger the problem:

> As pointed out in the comments below, equivalent forms of the number
> cause the problem as well; examples:
> 
> 0.00022250738585072012e-304 (decimal point placement)
> 00000000002.2250738585072012e-308 (leading zeros)
> 2.225073858507201200000e-308 (trailing zeros)
> 2.2250738585072012e-00308 (leading zeros in the exponent)
> 2.2250738585072012997800001e-308 (superfluous digits beyond digit 17)

This makes a robust fix more difficult.

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990944#comment-12990944 ] 

Mark Struberg commented on MYFACES-3024:
----------------------------------------

took me a while to figure where this got fixed.
Finally found it listed on http://tomcat.apache.org/security-7.html

Here is the respective commit:

http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?r1=1066244&r2=1066243&pathrev=1066244


> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991028#comment-12991028 ] 

Mark Struberg commented on MYFACES-3024:
----------------------------------------

oki fixed by first removing all dots and then parsing for 22250738585072012. In this case I return 0.0d

Since I only do all this stuff if the value.length is > 23 this should not affect the performance for normal use cases.

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990601#comment-12990601 ] 

Mark Struberg commented on MYFACES-3024:
----------------------------------------

I think we can fix this pretty easily. As far as I know this is the only value which got found causing this problem. I think we can just hardcode a fix in the converter, can't we?

Btw, there are a few other (already fixed) issues since our last release which would justify shipping a new build really soon.

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>            Priority: Critical
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-3024) MyFaces hangs when converting 2.2250738585072012e-308

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990502#comment-12990502 ] 

Werner Punz commented on MYFACES-3024:
--------------------------------------

Since you can shoot a site out of existence by pushing this into a field which does the double conversion of a field, I would raise this bug to critical.

> MyFaces hangs when converting 2.2250738585072012e-308
> -----------------------------------------------------
>
>                 Key: MYFACES-3024
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3024
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Matthias Weßendorf
>
> I read
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
> Nice! and it even works with JSF :-)
> Looking at the MyFaces (double) converter, I see "Double.valueOf()" 
> Now, I did a quick check, with Trinidad (disabled client-side validation) and MyFaces (since Trinidad calls super.getAsObject()).
> Entering "2.2250738585072012e-308" into a field, that has a double converter is keeping my JVM _really_ busy ! :)
> Sweet!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira