| Prepared by: | Chuck Rasbold (rasbold) on Mon Apr 21 14:05:10 PDT 2008 |
|---|---|
| Workspace: | /export/rasbold/hg/6646019 |
| Compare against: | /net/jano2.sfbay/export2/hotspot/hg/hotspot-comp.clean |
| Summary of changes: | 66 lines changed: 62 ins; 0 del; 4 mod; 2217 unchg |
| Patch of changes: | 6646019.patch |
| Author comments: |
6646019: array subscript expressions become top() with -d64
Summary: avoid failures while compiling not-taken paths Reviewed-by: Several "Tester" programs fail (in different ways) with -d64 when a negative array length or negative subscript is used. C2 proves that the subscript expression does not meet the array bounds and a ConvI2LNode construction returns top. The top node can cause problems downstream with a variety of assertion failures or crashes. The fix in parse2.cpp preemptively handles the cases when the array bound is negative. The CmpU bounds check trick doesn't work if the array bound is negative. However, if the parser observes the bound is negative, then it can proceed as if it is 0, and the exiting mechanism causes the path to disappear into an uncommon_trap. |
| Legend: |
Modified file Deleted file New file |
Cdiffs
Udiffs
Sdiffs
Frames
Old
New
Patch
Raw
src/share/vm/opto/parse2.cpp
13 lines changed: 9 ins; 0 del; 4 mod; 2217 unchg
------ ------ ------
------
---
New
Patch
Raw
test/compiler/6646019/Test.java
53 lines changed: 53 ins; 0 del; 0 mod; 0 unchg
This code review page was prepared using /home/rasbold/bin/webrev (vers 23.13-hg).