Complete translation of unsafe native code to safe bytecode

  • Authors:
  • Brian Alliet;Adam Megacz

  • Affiliations:
  • Rochester Institute of Technology;University of California, Berkeley

  • Venue:
  • Proceedings of the 2004 workshop on Interpreters, virtual machines and emulators
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Existing techniques for using code written in an unsafe language within a safe virtual machine generally involve transformations from one source code language (such as C, Pascal, or Fortran) to another (such as Java) which is then compiled into virtual machine bytecodes.We present an alternative approach which translate MIPS binaries produced by any compiler into safe virtual machine bytecodes. This approach offers four key advantages over existing techniques: it is language agnostic, it offers bug-for-bug compiler compatibility, requires no post-translation human intervention, and introduces no build process modifications.We also present NestedVM, an implementation of this technique, and discuss its application to six software packages: LINPACK (Fortran), which was used as one of our performance tests, TEX (Pascal), which was used to typeset this document, libjpeg, libmspack, and FreeType (all C source), which are currently in production use as part of the Ibex Project [13], and gcc, which was used to compile all of the aforementioned.Performance measurements indicate a best case performance within 3x of native code and worst case typically within 10x, making it an attractive solution for code which is not performance-critical.