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.

Um método e um instrumento para encontrar erros relacionaram-se à coleção do lixo em uma máquina virtual. Para cada ponto possível da coleção do lixo em um córrego da execução, um compilador na máquina virtual fornece um mapa que especifique posições vivas do ponteiro na pilha. Além, o mapa identifica aquelas posições na pilha que contêm outros formulários de dados vivos, tais como inteiros. Todas posições restantes são consideradas "mortos," isto é, não mais longo no uso ou nunca usadas. Em cada ponto da coleção do lixo, as posições "inoperantes" na pilha overwritten com um valor de ponteiro inválido. Por causa do processo overwriting, todo o erro no compilador que causa um ponteiro vivo a ser omitido do mapa faz com também que o ponteiro omitido overwritten com o valor de ponteiro inválido. Não obstante se a coleção do lixo está executada realmente no ponto da coleção do lixo onde o ponteiro foi omitido do mapa compilador-gerado, etapas subseqüentes da execução que reference o disparador omitido do ponteiro um erro inválido do ponteiro. O erro inválido do ponteiro pode ser prendido e identificado como um erro do compilador relacionado à geração do mapa no processo da coleção do lixo.

 
Web www.patentalert.com

< (none)

< Generating a compiled language program for an interpretive runtime environment

> Method and system for identifying instrumentation targets in computer programs related to logical transactions

> (none)

~ 00021