Posted by pipi1889
on October 27, 2009 at 2:18 AM PDT
Sometime segment fail occurs at /src/share/javavm/runtime/jit/jitir.c file when enable JIT. My code version is phoneme_advanced-mr2-dev-b136. After tracking, it occurs in handle for 'opc_lookupswitch' in translateRange method of jitir.c. The relative codes are as following:
CVMInt32 matchValue = CVMgetAlignedInt32(&lpc[2+2*gapEntry]);
CVMUint16 pcOffset = CVMgetAlignedInt32(&lpc[3+2*gapEntry]);
CVMJITIRBlock* targetbk = mc->pcToBlock[pc + pcOffset];
from the JVM spec description in http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.do...
about lookupswitch bytecode, I think the type of pcOffset should be CVMInt32, otherwise, if the offset is less than 0, "mc->pcToBlock[pc + pcOffset]" may have problem.
Has anyone encountered this situation?? Or some other better way to fix this segment fail. Thanks