commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Roberts (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BCEL-195) addition of hashCode() to generic/Instruction.java breaks Targeters
Date Wed, 04 Feb 2015 22:05:34 GMT

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

Mark Roberts commented on BCEL-195:
-----------------------------------

I know, I know...   Unfortunately, the simplest way for me would require you (or somebody
on the team) to install Daikon.   Otherwise, I not sure how to proceed. 

 In any case, I would prefer to get all my issues on board first so you can see which make
the 6.0 cut.

Thank you your all your help.

Mark



> addition of hashCode() to generic/Instruction.java breaks Targeters
> -------------------------------------------------------------------
>
>                 Key: BCEL-195
>                 URL: https://issues.apache.org/jira/browse/BCEL-195
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Main
>            Reporter: Mark Roberts
>
> revision 1532198 added a hashCode() function to the Instruction class.  Unfortunately,
this breaks the Instruction targeting mechanism. I understand the goal of trying to reuse
instructions - an 'iadd' is the same as any other 'iadd'.  However,  one 'goto 50' is not
the same as another 'goto 50' due to the way Targeters are implemented.  If branch instructions
are reused, then only one entry gets put on the Targeter list.  So when some api is used to
modify the instruction list and location 50 becomes location 52 ONLY ONE of the branches gets
updated. A very bad thing.  So unless you modify the hash to special case branch instructions
(and there might be other instructions needing special treatment as well) its broken.  We
fixed it by simply commenting the hash out to make things like they used to be and all works
great.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message