You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Gura (JIRA)" <ji...@apache.org> on 2017/05/16 17:51:04 UTC

[jira] [Comment Edited] (IGNITE-602) [Test] GridToStringBuilder is vulnerable for StackOverflowError caused by infinite recursion

    [ https://issues.apache.org/jira/browse/IGNITE-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16012806#comment-16012806 ] 

Andrey Gura edited comment on IGNITE-602 at 5/16/17 5:50 PM:
-------------------------------------------------------------

[~SomeFire], I don't like that for every reference type instance {{ObjectWithPosition}} object will be created. It creates additional redundant pressure to GC. Also it seems that list is inappropriate data structure for reference tracking because it requires {{O(n)}} operation in order to check whether object is saved or not. It seems that {{IdentityHashMap}} is better choice for this purpose.


was (Author: agura):
[~SomeFire], I don't like that for every reference type instance {{ObjectWithPosition}} object will be created. It creates additional redundant pressure to GC. Also it seems that list is inappropriate data structure for reference tracking because it requires O(n) operation in order to check whether object is saved or not. It seems that {{IdentityHashMap}} is better choice for this purpose.

> [Test] GridToStringBuilder is vulnerable for StackOverflowError caused by infinite recursion
> --------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-602
>                 URL: https://issues.apache.org/jira/browse/IGNITE-602
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>            Reporter: Artem Shutak
>            Assignee: Ryabov Dmitrii
>              Labels: Muted_test
>             Fix For: 2.1
>
>
> See test org.gridgain.grid.util.tostring.GridToStringBuilderSelfTest#_testToStringCheckAdvancedRecursionPrevention and related TODO in same source file.
> Also take a look at http://stackoverflow.com/questions/11300203/most-efficient-way-to-prevent-an-infinite-recursion-in-tostring
> Test should be unmuted on TC after fix.
> see GG-5000.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)