mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8279527: Dereferencing segments backed by different scopes leads to pollution
Reviewed-by: psandoz, jvernee
This commit is contained in:
parent
967ef0c482
commit
d65c665839
8 changed files with 64 additions and 76 deletions
|
@ -767,7 +767,11 @@ public abstract class Buffer {
|
|||
final void checkScope() {
|
||||
ScopedMemoryAccess.Scope scope = scope();
|
||||
if (scope != null) {
|
||||
scope.checkValidState();
|
||||
try {
|
||||
scope.checkValidState();
|
||||
} catch (ScopedMemoryAccess.Scope.ScopedAccessError e) {
|
||||
throw new IllegalStateException("This segment is already closed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue