typetools / typetools/checker-framework

java.lang.IllegalAccessError in dataflow's CFG visualizer

Open
#5,718 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

I git-cloned the checker-framework repo and ran the test for constant propagation in Intellij with open-jdk18.

> Task :dataflow:ConstantPropagation.main() FAILED
Exception in thread "main" java.lang.IllegalAccessError: class org.checkerframework.dataflow.cfg.visualize.CFGVisualizeLauncher (in unnamed module @0x297e187e) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x297e187e
	at org.checkerframework.dataflow.cfg.visualize.CFGVisualizeLauncher.generateMethodCFG(CFGVisualizeLauncher.java:223)
	at org.checkerframework.dataflow.cfg.visualize.CFGVisualizeLauncher.generateStringOfCFG(CFGVisualizeLauncher.java:309)
	at constantpropagation.ConstantPropagation.main(ConstantPropagation.java:32)

It seems that the Context constructor from com.sun.tools.javac.util is not working.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with dataflow/src/main/java/org/checkerframework/dataflow/cfg/visualize/CFGVisualizeLauncher.java, especially generateMethodCFG at line 223, and reproduce the failure using constantpropagation/ConstantPropagation.java. Check how the JDK module access error affects the CFG visualizer; done means the constant-propagation test runs without this IllegalAccessError on OpenJDK 18.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.