Skip to content

Interactive Cross-Language Pointer Analyzer For JNI Programs

Notifications You must be signed in to change notification settings

penguinfirst/JNIFER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JNIFER

JNIFER is an interactive cross-language pointer analysis tool designed for analyzing JNI (Java Native Interface) programs. It consists of two main components:

  • Java Analyzer: Built on top of Tai-e.
  • C Analyzer: Built on top of SVF-2.5.

JNIFER performs pointer analysis across Java and C code, helping developers understand interactions across the language boundary.

Deployment

Although the Java and C analyzers interact during pointer analysis, their deployments are independent. We strongly recommend setting up Tai-e and SVF in an IDE (IntelliJ IDEA for Tai-e and CLion for SVF) after cloning the repository.

Refer to the following documents for setting up the Java and C components in their respective IDEs:

Note: In Setup SVF in CLion, change the LLVM version from 16.0.0 to 13.0.1.

Key Components for Extension

Java Analyzer (Tai-e Based)

All key components are located in Tai-e/src/main/java/pascal/taie/analysis/pta/plugin/jnifer:

  • JNIModel.java – Defines the cross-language model for representing C elements in Java.
  • MyPackage.java – Implements the transformation of C messages into requests and replies (cross-language interaction protocol).
  • NativeReceiver.java – Handles cross-language requests and replies.
  • NativeActionModel.java – Manages interactions with the C analyzer, triggering updates when the points-to set of a C-related Java pointer changes.

C Analyzer (SVF Based)

All key components are located in SVF/lib/Jnifer:

  • JNIFunctionModel/ – Contains models for JNI functions.
  • JNIModel.cpp – Defines the representation of Java elements and JNIEnv structures in C, and applies JNI function models during C analysis.
  • MyPackage.cpp – Implements the transformation of Java messages into requests and replies (cross-language interaction protocol).
  • JavaReceiver.cpp – Handles cross-language requests and replies.

Contributing

Contributions are welcome! Please submit issues and pull requests via GitHub.

About

Interactive Cross-Language Pointer Analyzer For JNI Programs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published