Skip to content

Commit

Permalink
8269232: assert(!is_jweak(handle)) failed: wrong method for detroying…
Browse files Browse the repository at this point in the history
… jweak

Reviewed-by: rkennke, amenkov, sspitsyn, sgehwolf
  • Loading branch information
plummercj committed Jun 29, 2021
1 parent b8a16e9 commit 401cb0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/jdk.jdwp.agent/share/native/libjdwp/commonRef.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ weakenNode(JNIEnv *env, RefNode *node)
}
return weakRef;
} else {
node->strongCount--;
if (node->strongCount > 0) {
node->strongCount--;
}
return node->ref;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, 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 @@ -143,7 +143,11 @@ public int runIt(String argv[], PrintStream out) {
disableObjectCollection(objectID);

// perform testing JDWP command
log.display("\n>>> Testing JDWP command \n");
log.display("\n>>> Testing JDWP EnableCollection command after JDWP DisableCollection\n");
testCommand(objectID);

// perform testing JDWP command
log.display("\n>>> Testing JDWP EnableCollection command with no JDWP DisableCollection\n");
testCommand(objectID);

} finally {
Expand Down

0 comments on commit 401cb0a

Please sign in to comment.