JET: Exception checking in the java native interface

Siliang Li, Gang Tan

Research output: Chapter in Book/Report/Conference proceedingConference contribution

18 Scopus citations

Abstract

Java's type system enforces exception-checking rules that stipulate a checked exception thrown by a method must be declared in the throws clause of the method. Software written in Java often invokes native methods through the use of the Java Native Interface (JNI). Java's type system, however, cannot enforce the same exception-checking rules on Java exceptions raised in native methods. This gap makes Java software potentially buggy and often difficult to debug when an exception is raised in native code. In this paper, we propose a complete static-analysis framework called JET to extend exception-checking rules even on native code. The framework has a two-stage design where the first stage throws away a large portion of irrelevant code so that the second stage, a fine-grained analysis, can concentrate on a small set of code for accurate bug finding. This design achieves both high efficiency and accuracy. We have applied JET on a set of benchmark programs with a total over 227K lines of source code and identified 12 inconsistent native-method exception declarations. Copyright is held by the author / owner(s).

Original languageEnglish (US)
Title of host publicationOOPSLA'11 - Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications
Pages345-357
Number of pages13
DOIs
StatePublished - 2011
Event2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA'11 - Portland, OR, United States
Duration: Oct 22 2011Oct 27 2011

Publication series

NameProceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA

Other

Other2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA'11
Country/TerritoryUnited States
CityPortland, OR
Period10/22/1110/27/11

All Science Journal Classification (ASJC) codes

  • Software

Fingerprint

Dive into the research topics of 'JET: Exception checking in the java native interface'. Together they form a unique fingerprint.

Cite this