GoogleCloudPlatform / GoogleCloudPlatform/cloud-opensource-java

False negative: multianewarray may raise IllegalAccessError

Open
#1,655 0 comments 0 reactions 0 assignees View on GitHub
bug p2
Dominant language
Java
Stars
163
Forks
80
PR merge metrics
No merged PRs in 30d

Description

Linkage Checker may miss an invalid reference for multi-dimensional array creation.

Linkage Checker only looks for the class references (Class_info data) in the constant pool of class files. However, JVM operation "multianewarray" creates multi-dimensional array of a class without the class reference. It uses a class reference of array of array of the class.

Example https://gist.github.com/suztomo/d8a4bcadb06ac22393321f9d82f05e6c:

```
#2 = Class #19 // "[[Lfoo/B;"
...

2: multianewarray #2, 2 // class "[[Lfoo/B;"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.