-
Bug
-
Resolution: Fixed
-
P3
-
8, 11, 17, 21, 22, 23
-
b07
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8324849 | 22.0.1 | Aleksey Shipilev | P3 | Resolved | Fixed | b03 |
JDK-8324863 | 21.0.4-oracle | Vladimir Kozlov | P3 | Resolved | Fixed | b01 |
JDK-8324652 | 21.0.3 | Aleksey Shipilev | P3 | Resolved | Fixed | b01 |
JDK-8326956 | 17.0.12-oracle | Tobias Hartmann | P3 | Resolved | Fixed | b01 |
JDK-8326926 | 17.0.12 | Aleksey Shipilev | P3 | Resolved | Fixed | b01 |
The JIT might scalar-replace a string, but then generate it onto the heap. (This is for deoptimization, recovery from an uncommon event, previously speculated against.) In that case the JIT generates the string object not by executing code but interpreting debug-info. If that generation process failed to issue a store-store barrier, on a CPU that needed it, and there was no other store-store barrier issued (during the course of deoptimization), then conceivably you might get a race.
I agree. Consider next case where object escapes after deoptimization:
public class Test {
int _i;
public static Test _t; // Externally visible static field
public Test(int i) { _i = i; }
void test(int i) {
Test t = new Test(i);
if (i == foo()) {
// Rare case so C2 generates uncommon trap.
// Object 't' does not escape from EA POV since
// it is referenced only by uncommon trap.
// It will escape after deoptimization.
Test::_t = t;
}
}
}
- backported by
-
JDK-8324652 Issue store-store barrier after re-materializing objects during deoptimization
- Resolved
-
JDK-8324849 Issue store-store barrier after re-materializing objects during deoptimization
- Resolved
-
JDK-8324863 Issue store-store barrier after re-materializing objects during deoptimization
- Resolved
-
JDK-8326926 Issue store-store barrier after re-materializing objects during deoptimization
- Resolved
-
JDK-8326956 Issue store-store barrier after re-materializing objects during deoptimization
- Resolved
- relates to
-
JDK-8322854 Incorrect rematerialization of scalar replaced objects in C2
- Closed
- links to
-
Commit openjdk/jdk17u-dev/8c3dcf30
-
Commit openjdk/jdk21u-dev/7fcfea52
-
Commit openjdk/jdk22u/af59286d
-
Commit openjdk/jdk/52523d33
-
Review openjdk/jdk17u-dev/2172
-
Review openjdk/jdk21u-dev/211
-
Review openjdk/jdk22u/28
-
Review openjdk/jdk/17503