[jboss-jira] [JBoss JIRA] (JGRP-1400) Bad attempt to compute absolute value of signed 32-bit hashcode. Condition.await() not in loop. Field isn't final but should be.
David Westbrook (Commented) (JIRA)
jira-events at lists.jboss.org
Wed Dec 14 16:28:15 EST 2011
[ https://issues.jboss.org/browse/JGRP-1400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651064#comment-12651064 ]
David Westbrook commented on JGRP-1400:
---------------------------------------
Ah, I see.
> Bad attempt to compute absolute value of signed 32-bit hashcode. Condition.await() not in loop. Field isn't final but should be.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: JGRP-1400
> URL: https://issues.jboss.org/browse/JGRP-1400
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.0.1
> Environment: Ubuntu 10.10
> Reporter: David Westbrook
> Assignee: Bela Ban
> Priority: Minor
> Labels: Await,, Final, Hash,
> Fix For: 3.1
>
>
> Bad attempt to compute absolute value of signed 32-bit hashcode. If the hashcode is Integer.MIN_VALUE, then the result will be negative as well (since Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE). Fix: Math.abs(Integer.MIN_VALUE & FFFFFFF0), removing -2^31 as a possibility. At PartitionedHashMap.java:[line 457] in method org.jgroups.blocks.PartitionedHashMap$ConsistentHashFunction.viewAccepted(View)
> Condition.await() not in loop. If the object is used for multiple conditions, the condition the caller intended to wait for might not
> be the one that actually occurred. Fix: Put the if statement in a while loop. At locking.java:[line 186] in method org.jgroups.protocols.Locking.down(Event)
> Field isn't final but should be. A mutable static field could be changed by malicious code or by accident from another package.
> Fix: Made the field final. At PartitionedHashMap.java:[line74] Field org.jgroups.blocks.PartitionedHashMap.methods
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list