-
Bug
-
Resolution: Fixed
-
P4
-
25
-
b15
-
riscv
-
linux
As discussed in [1], there is no need to distinuish T_BYTE and T_CHAR when calculating base offset for strings.
The reason is that the low-level character storage used for both Latin1 and UTF16 strings is always a byte array [2].
So we should always use T_BYTE for both cases. This won't make a difference on the calculated base offset for now.
But it's better to fix this for code readability purposes.
[1] https://github.com/openjdk/jdk/pull/23633#discussion_r1974591975
[2] https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/String.java#L160
The reason is that the low-level character storage used for both Latin1 and UTF16 strings is always a byte array [2].
So we should always use T_BYTE for both cases. This won't make a difference on the calculated base offset for now.
But it's better to fix this for code readability purposes.
[1] https://github.com/openjdk/jdk/pull/23633#discussion_r1974591975
[2] https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/String.java#L160
- caused by
-
JDK-8347489 RISC-V: Misaligned memory access with COH
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/375722f4
-
Review(master) openjdk/jdk/24006