JET

Exception checking in the java native interface

Siliang Li, Gang Tan

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

6 Citations (Scopus)

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 - Nov 23 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

Other

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

Fingerprint

Static analysis

All Science Journal Classification (ASJC) codes

  • Software

Cite this

Li, S., & Tan, G. (2011). JET: Exception checking in the java native interface. In OOPSLA'11 - Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications (pp. 345-357) https://doi.org/10.1145/2048066.2048095
Li, Siliang ; Tan, Gang. / JET : Exception checking in the java native interface. OOPSLA'11 - Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications. 2011. pp. 345-357
@inproceedings{d1dd09411dae4838b529a21bcfd20d65,
title = "JET: Exception checking in the java native interface",
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).",
author = "Siliang Li and Gang Tan",
year = "2011",
month = "11",
day = "23",
doi = "10.1145/2048066.2048095",
language = "English (US)",
isbn = "9781450309400",
pages = "345--357",
booktitle = "OOPSLA'11 - Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications",

}

Li, S & Tan, G 2011, JET: Exception checking in the java native interface. in OOPSLA'11 - Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications. pp. 345-357, 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA'11, Portland, OR, United States, 10/22/11. https://doi.org/10.1145/2048066.2048095

JET : Exception checking in the java native interface. / Li, Siliang; Tan, Gang.

OOPSLA'11 - Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications. 2011. p. 345-357.

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

TY - GEN

T1 - JET

T2 - Exception checking in the java native interface

AU - Li, Siliang

AU - Tan, Gang

PY - 2011/11/23

Y1 - 2011/11/23

N2 - 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).

AB - 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).

UR - http://www.scopus.com/inward/record.url?scp=81455154907&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=81455154907&partnerID=8YFLogxK

U2 - 10.1145/2048066.2048095

DO - 10.1145/2048066.2048095

M3 - Conference contribution

SN - 9781450309400

SP - 345

EP - 357

BT - OOPSLA'11 - Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications

ER -

Li S, Tan G. JET: Exception checking in the java native interface. In OOPSLA'11 - Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications. 2011. p. 345-357 https://doi.org/10.1145/2048066.2048095