Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.9.2
-
Fix Version/s: 2.9.3
-
Component/s: Compiler: Optimizing
-
Labels:None
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :
Description
When the optimising compiler folds a chain of final references it may substitute the target of the references chain with an equal but non-identical object.
The attached patch against 2.9.2 fixes this by changing VM_Statics.objectLiterals to use identity instead of equality. While this corrects the problem it may or may not be the best way of solving it.
STATEMENT OF ORIGIN FOR A SINGLE CONTRIBUTOR
I, Yuval Yarom:
(a) represent that either:
I am the only author and owner of the contributed software
(described as/entitled fixing runtime package isolation),
which was neither derived nor copied from any other software,
or
(ii) that any exception to
is software which was obtained under the
CPL (Common Public License),
and
(b) hereby agree to license this contributed software under the CPL.
Attachments
Issue Links
| This issue is related to: | ||||
| RVM-371 | 13956 broke PPC64 development build |
|
|
|
I agree with the problem and that the fix should solve it, however, it seems ugly to me to put an identity hash map implementation in to the already crowded VM_Statics. We could refactor VM_HashMap so that it has an overridable means of determining whether two values are equal and then create an identity hash map that overrides this method (to use == instead of .equals). We can then change the map for objects in VM_Statics to use an identity hashmap rather than a regular hashmap, and the rest of the code in VM_Statics can remain unchanged.