8324050: Issue store-store barrier after re-materializing objects during deoptimization

Reviewed-by: dlong, shade
This commit is contained in:
Vladimir Kozlov 2024-01-22 22:50:32 +00:00
parent df370d725e
commit 52523d33dd

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1603,6 +1603,10 @@ void Deoptimization::reassign_fields(frame* fr, RegisterMap* reg_map, GrowableAr
reassign_object_array_elements(fr, reg_map, sv, (objArrayOop) obj());
}
}
// These objects may escape when we return to Interpreter after deoptimization.
// We need barrier so that stores that initialize these objects can't be reordered
// with subsequent stores that make these objects accessible by other threads.
OrderAccess::storestore();
}