[ 
https://issues.apache.org/jira/browse/IGNITE-15716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eduard Rakhmankulov updated IGNITE-15716:
-----------------------------------------
    Description: 
We can get infinite loop in org.apache.ignite.internal.util.typedef.X#hasCause 
and X#cause in case if exception is suppressed with itself.


 Example:
{code:java}
Exception e = new Exception("foo");
 Exception e2 = new Exception(e);
 e.addSuppressed(e2)
{code}
 

Stack:
{code:java}
java.lang.StackOverflowError: null
 at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:476)
 at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
 at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
 at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
 
{code}
 

  was:
We can get infinite loop in org.apache.ignite.internal.util.typedef.X#hasCause 
in case if exception is suppressed with itself.
Example

 

{{Exception e = new Exception("foo");
Exception e2 = new Exception(e);
e.addSuppressed(e2)}}

Stack:

 

{{java.lang.StackOverflowError: null
        at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:476)
        at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
        at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
        at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)       
}}

Also it’s going to be prefect to investigate if there any places where we can 
suppress the same exception.

 


> Fix StackOverflowError in case if exception suppressed with itself
> ------------------------------------------------------------------
>
>                 Key: IGNITE-15716
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15716
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Eduard Rakhmankulov
>            Assignee: Eduard Rakhmankulov
>            Priority: Minor
>
> We can get infinite loop in 
> org.apache.ignite.internal.util.typedef.X#hasCause and X#cause in case if 
> exception is suppressed with itself.
>  Example:
> {code:java}
> Exception e = new Exception("foo");
>  Exception e2 = new Exception(e);
>  e.addSuppressed(e2)
> {code}
>  
> Stack:
> {code:java}
> java.lang.StackOverflowError: null
>  at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:476)
>  at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
>  at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
>  at org.apache.ignite.internal.util.typedef.X.hasCause(X.java:489)
>  
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to