Type safety in the JVM: some problems in Java 2 SDK 1.2 and proposed solutions
โ Scribed by Alessandro Coglio; Allen Goldberg
- Book ID
- 102120114
- Publisher
- John Wiley and Sons
- Year
- 2001
- Tongue
- English
- Weight
- 183 KB
- Volume
- 13
- Category
- Article
- ISSN
- 1532-0626
- DOI
- 10.1002/cpe.596
No coin nor oath required. For personal study only.
โฆ Synopsis
Abstract
In the course of our work in developing formal specifications for components of the Java Virtual Machine (JVM), we have uncovered subtle bugs in the bytecode verifier of Sun's Java 2 SDK 1.2. These bugs, which lead to type safety violations, relate to the naming of reference types. Under certain circumstances, these names can be spoofed through delegating class loaders. These flaws expose some inaccuracies and ambiguities in the JVM specification.
We propose several solutions to all of these bugs. In particular, we propose a general solution that makes use of subtype loading constraints. Such constraints complement the equality loading constraints introduced in the Java 2 Platform, and are posted by the bytecode verifier when checking assignment compatibility of class types. By posting constraints instead of resolving and loading classes, the bytecode verifier in our solution has a cleaner interface with the rest of the JVM, and allows lazier loading. We sketch some excerpts of our mathematical formalization of this approach and of its type safety results. Copyright ยฉ 2001 John Wiley & Sons, Ltd.
๐ SIMILAR VOLUMES
The 'SN-labelled fertilizer dilution technique provides a method of obtaining estimates of biological N,-fixation in the field over the growing season. Field estimates of fixation obtained using peas, french beans, field beans and clover depended on the non-fixing control used. Differences in the N