A type system for object initialization in the Java bytecode language
- 1 November 1999
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 21 (6) , 1196-1250
- https://doi.org/10.1145/330643.330646
Abstract
In the standard Java implementation, a Java language program is compiled to Java bytecode. This bytecode may be sent across the network to another site, where it is then executed by the Java Virtual Machine. Since bytecode may be written by hand, or corrupted during network transmission, the Java Virtual Machine contains a bytecode verifier that performs a number of consistency checks before code is run. These checks include type correctness and, as illus-trated by previous attacks on the Java Virtual Machine, are critical for system security. In order to analyze existing bytecode verifiers and to understand the properties that should be verified, we develop a precise specification of statically correct Java bytecode, in the form of a type system. Our focus in this article is a subset of the bytecode language dealing with object creation and initialization. For this subset, we prove, that, for every Java bytecode program that satisfies our typing constraints, every object is initialized before it is used. The type system is easily combined with a previous system developed by Stata and Abadi for bytecode subroutines. Our analysis of subroutines and object initialization reveals a previously unpub-lished bug in the Sun JDK bytecode verifier.Keywords
This publication has 9 references indexed in Scilit:
- From system F to typed assembly languageACM Transactions on Programming Languages and Systems, 1999
- A simple, comprehensive type system for Java bytecode subroutinesPublished by Association for Computing Machinery (ACM) ,1999
- A compositional account of the Java virtual machinePublished by Association for Computing Machinery (ACM) ,1999
- A type system for Java bytecode subroutinesACM Transactions on Programming Languages and Systems, 1999
- Is the Java type system sound?Theory and Practice of Object Systems, 1999
- A specification of Java loading and bytecode verificationPublished by Association for Computing Machinery (ACM) ,1998
- On a New Method for Dataflow Analysis of Java Virtual Machine SubroutinesPublished by Springer Nature ,1998
- Javalight is type-safe---definitelyPublished by Association for Computing Machinery (ACM) ,1998
- TILACM SIGPLAN Notices, 1996