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: kvn
Backport-of: 52523d33dde797bf03b15a05bb227b19b22c06be
  • Loading branch information
shipilev committed Feb 28, 2024
1 parent 4b0a015 commit 8c3dcf3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hotspot/share/runtime/deoptimization.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, 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 @@ -1476,6 +1476,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

1 comment on commit 8c3dcf3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.