JDK-6371167 : fastdebug c2 fails assertion on x86 platforms: adr_type must match alias idx
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: other
  • CPU: x86
  • Submitted: 2006-01-11
  • Updated: 2010-04-03
  • Resolved: 2006-02-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b72Fixed
Related Reports
Relates :  
Description
The attached test fails assertion on all x86 platforms while compiling Test_Class_0 constructor:

alias_idx==11, adr_type()==Test_Class_0:exact *[int+]:NotNull:exact*+8
--- Alias types, AliasIdxBot .. 11
@ <2>     +any in BotPTR *+bot
@ <3>     +0   in rawptr:BotPTR
@ <4>     +8   in Test_Class_0:exact+8 *
@ <5>  RO +16  in Test_Class_0:exact+16 *
@ <6>  RO +32  in Test_Class_0:exact+32 *
@ <7>     +24  in Test_Class_0:exact+24 *
@ <8>     +336 in precise klass Test_Class_0: 0x080bfd28:Constant:exact+336 *
@ <9>     +328 in precise klass Test_Class_0: 0x080bfd28:Constant:exact+328 *
@ <10> RO +8   in bottom[int+]*+8
@ <11>    +any in java/lang/Object *[int+]*+any
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/memnode.cpp:98]
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  Internal Error (/BUILD_AREA/jdk6.0/hotspot/src/share/vm/opto/memnode.cpp, 98), pid=17411, tid=2894019504
#
# Java VM: Java HotSpot(TM) Server VM (1.6.0-rc-fastdebug-b62-debug compiled mode)
#
# Error: assert(consistent,"adr_type must match alias idx")
# An error report file with more information is saved as hs_err_pid17411.log

Comments
SUGGESTED FIX Webrev: http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2006/20060131172241.kvn.6371167/workspace/webrevs/webrev-2006.02.01/index.html
01-02-2006

SUGGESTED FIX Do not assert in the situation when dead array references collapse to a[-1], a[-2] or a[-3].
13-01-2006

EVALUATION An array reference in a dead part of a code could look like the reference to the array's length, klass or mark (a[-1], a[-2], a[-3]) when one is expecting only an element reference (a[i]). In the bug case the array index is -1 but the guarding IF node still not processed when we start processing the Load node in the dead path which causes this assert. 71 ConI === 0 [[ 292 255 317 393 ]] #int:0 !Note=0x080bdd90 317 If === 300 71 [[ 318 319 ]] P=0.999999, C=-1.000000 !Note=0x0812d690 318 IfTrue === 317 [[ 335 330 ]] #1 !Note=0x0812d694 398 MergeMem === _ 1 24 1 1 1 1 1 1 399 [[ 295 381 330 ]] { - - - - - - N399:precise klass Test_Class_0: 0x08123550:Constant:exact+328 * } Memory: @BotPTR *+bot, idx=Bot; !Note=0x0812d7d4 328 AddP === _ 308 329 284 [[ 330 ]] !Note=0x0812d6bc 330 LoadP === 318 398 328 [[ 338 341 331 338 ]] @java/lang/Object*[int+]*+any, idx=11; #Test_Class_0:exact * Oop:Test_Class_0:exact * !Note=0x0812d6c4 [t@11 l@11]: print phase->type( address )->dump() Test_Class_0:exact *[int+]:NotNull:exact*+any [t@11 l@11]: print adr_type()->dump() Test_Class_0:exact *[int+]:NotNull:exact*+8
13-01-2006