Patents
US 6,327,701 B2#1654082 Most CitedExpiredUnited States (USPTO)Utility

Method and apparatus for finding bugs related to garbage collection in a virtual machine

36Forward Citations (#1654082 Global)
1.4/yrCitation Velocity (#3738805 Global)
8.01Citation PageRank (#1534261 Global)
23Prior Art Cited
3Claims (1 Indep. · 2 Dep.)
0Drawings / Sheets

Abstract

A method and apparatus for finding bugs related to garbage collection in a virtual machine. For each possible garbage collection point in a stream of execution, a compiler in the virtual machine provides a map that specifies live pointer locations in the stack. In addition, the map identifies those locations in the stack that contain other forms of live data, such as integers. All other locations are considered “dead,” i.e., no longer in use or never used. At each garbage collection point, “dead” locations in the stack are overwritten with an invalid pointer value. Because of the overwriting process, any bug in the compiler that causes a live pointer to be omitted from the map also causes the omitted pointer to be overwritten with the invalid pointer value. Regardless of whether garbage collection is actually performed at the garbage collection point where the pointer was omitted from the compiler-generated map, subsequent execution steps that reference the omitted pointer trigger an invalid pointer error. The invalid pointer error may be trapped and identified as a compiler bug related to map generation in the garbage collection process.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 23 · Forward citations: 36.

Claims (3 — 1 Independent, 2 Dependent)

  1. Claim 1Independent Claim

    In a computer system, a method for finding program code bugs comprising: obtaining a map of a plurality of pointers to live objects and data; determining memory locations that do not contain at least one of said plurality of pointers based on a said map; overwriting said memory locations with an invalid pointer value; and issuing a warning if a resource attempts to access one of said memory locations containing said invalid pointer value.

  2. Claim 2Depends on #1

    The method of claim 1 , further comprising implementing a trap for a reference made via said invalid pointer value.

  3. Claim 3Depends on #1

    The method of claim 1 , further comprising generating said map in a compiler.

Technical Overview & Description

Full multi-page specification text is archived at the issuing office. Read complete official specification ↗

References Cited — Backward Prior Art (23)

PatentTitleYearCitations
US 4,775,932 AComputer memory system with parallel garbage collection independent from an associated user processor1988250
US 4,797,810 AIncremental, multi-area, generational, copying garbage collector for use in a virtual address space1989109
US 4,989,134 AMethod and apparatus for enhancing data storage efficiency1991176
US 5,088,036 AReal time, concurrent garbage collection system and method1992363
US 5,355,483 AAsynchronous garbage collection1994138
US 5,560,003 ASystem and hardware module for incremental real time garbage collection and memory management1996241
US 5,590,332 AGarbage collection, tail recursion and first-class continuations in stack-oriented languages1996101
US 5,652,883 AComputer method and system for conservative-stack and generational heap garbage collection199793
US 5,687,368 ACPU-controlled garbage-collecting memory module1997107
US 5,692,185 AObject space manager method and circuit199773
US 5,799,185 AMethod and system for managing system memory reclamation199857
US 5,819,304 ARandom access memory assembly1998141
US 5,832,289 ASystem for estimating worst time duration required to execute procedure calls and looking ahead/preparing for the next stack operation of the forthcoming procedure calls199885
US 5,845,298 AWrite barrier system and method for trapping garbage collection page boundary crossing pointer stores1998145
US 5,873,105 ABounded-pause time garbage collection system and method including write barrier associated with a source instance of a partially relocated object1999128

Non-Patent Literature (2)

  • Title: Garbage Collection for Strongly type languages using run-time type reconstruction, Aditya et al, ACM, 1994.
  • Title: Space Efficient Conservative Garbage Collection Author: Boehm, ACM, 1993.*