Skip to content

Commit 365f19c

Browse files
author
Sandhya Viswanathan
committed
8254790: SIGSEGV in string_indexof_char and stringL_indexof_char intrinsics
Reviewed-by: kvn, thartmann
1 parent f813a28 commit 365f19c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2717,7 +2717,7 @@ void C2_MacroAssembler::string_indexof_char(Register str1, Register cnt1, Regist
27172717
pmovmskb(tmp, vec3);
27182718
}
27192719
bsfl(ch, tmp);
2720-
addl(result, ch);
2720+
addptr(result, ch);
27212721

27222722
bind(FOUND_SEQ_CHAR);
27232723
subptr(result, str1);
@@ -2811,7 +2811,7 @@ void C2_MacroAssembler::stringL_indexof_char(Register str1, Register cnt1, Regis
28112811
pmovmskb(tmp, vec3);
28122812
}
28132813
bsfl(ch, tmp);
2814-
addl(result, ch);
2814+
addptr(result, ch);
28152815

28162816
bind(FOUND_SEQ_CHAR);
28172817
subptr(result, str1);

src/hotspot/share/opto/c2compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
495495
case vmIntrinsics::_indexOfIU:
496496
case vmIntrinsics::_indexOfIUL:
497497
case vmIntrinsics::_indexOfU_char:
498-
// case vmIntrinsics::_indexOfL_char: // Disable it until found issues are fixed
498+
case vmIntrinsics::_indexOfL_char:
499499
case vmIntrinsics::_toBytesStringU:
500500
case vmIntrinsics::_getCharsStringU:
501501
case vmIntrinsics::_getCharStringU:

0 commit comments

Comments
 (0)