Skip to content

Commit

Permalink
8324050: Issue store-store barrier after re-materializing objects dur…
Browse files Browse the repository at this point in the history
…ing deoptimization

Reviewed-by: dlong, shade
  • Loading branch information
Vladimir Kozlov committed Jan 22, 2024
1 parent df370d7 commit 52523d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hotspot/share/runtime/deoptimization.cpp
@@ -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
Expand Down Expand Up @@ -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();
}


Expand Down

0 comments on commit 52523d3

Please sign in to comment.