-
Bug
-
Resolution: Fixed
-
P3
-
17, 19
-
b26
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8308882 | 17.0.9-oracle | Calvin Cheung | P3 | Resolved | Fixed | b01 |
JDK-8308650 | 17.0.8 | Aleksey Shipilev | P3 | Resolved | Fixed | b04 |
SonarCloud reports:
Address of stack memory associated with local variable 'method_signatures_table' is still referred to by the stack variable 'split_verifier' upon returning to the caller. This will be a dangling reference
See:
```
void ClassVerifier::verify_class(TRAPS) {
...
// Create hash table containing method signatures.
method_signatures_table_type method_signatures_table; // <--- stack-alloc
set_method_signatures_table(&method_signatures_table); // <--- pointer assignment
...
for (int index = 0; index < num_methods; index++) {
// Check for recursive re-verification before each method.
if (was_recursively_verified()) return; // <--- early return
Address of stack memory associated with local variable 'method_signatures_table' is still referred to by the stack variable 'split_verifier' upon returning to the caller. This will be a dangling reference
See:
```
void ClassVerifier::verify_class(TRAPS) {
...
// Create hash table containing method signatures.
method_signatures_table_type method_signatures_table; // <--- stack-alloc
set_method_signatures_table(&method_signatures_table); // <--- pointer assignment
...
for (int index = 0; index < num_methods; index++) {
// Check for recursive re-verification before each method.
if (was_recursively_verified()) return; // <--- early return
- backported by
-
JDK-8308650 Dangling reference in ClassVerifier::verify_class
-
- Resolved
-
-
JDK-8308882 Dangling reference in ClassVerifier::verify_class
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u-dev/39a6b558
-
Commit openjdk/jdk/3fa99844
-
Review openjdk/jdk17u-dev/1384
-
Review openjdk/jdk/9075
(1 links to)