Browse Prior Art Database

Method and System of Reverse Engineering Stack Traces to Reliably Reproduce Crashes

IP.com Disclosure Number: IPCOM000237427D
Publication Date: 2014-Jun-18
Document File: 2 page(s) / 38K

Publishing Venue

The IP.com Prior Art Database

Related People

Swapnil Patel: INVENTOR [+4]

Abstract

A method and system is disclosed for reverse engineering a stack trace generated at a crash to auto-generate test cases for each function/method call in an order of appearance in the stack trace. For each such function/method call called in a stack frame, a unit-test or functional-test is auto-generated to help reproduce the crash in a controlled environment. The method and system facilitates in parsing crashes for different platforms and in generating test cases in multiple programming languages.

This text was extracted from a Microsoft Word document.
This is the abbreviated version, containing approximately 52% of the total text.

Method and System of Reverse Engineering Stack Traces to Reliably Reproduce Crashes

Abstract

A method and system is disclosed for reverse engineering a stack trace generated at a crash to auto-generate test cases for each function/method call in an order of appearance in the stack trace.  For each such function/method call called in a stack frame, a unit-test or functional-test is auto-generated to help reproduce the crash in a controlled environment.  The method and system facilitates in parsing crashes for different platforms and in generating test cases in multiple programming languages.

Description

Disclosed is a method and system for reusing a stack trace generated for a crash report to reproduce an issue in a controlled software development environment.  The method and system assign symbols for each crash report version of a software application.  The method and system uses the symbolicated stack trace, and applies well known stream parsing techniques to go through all stack traces for all threads in the crash.  For each stack trace, the parser collects ordered stack frames.  Further, each stack frame in the stack trace for each thread is parsed to retrieve a class like memory address, library or package for the class, number of method parameters and/or other additional information provided by the stack frame.  For example, the stack trace can provide additional information which could help in generating functional tests to reproduce a multi-threaded crash such as type of exception, whether the thread is a background thread or main thread etc.

Once the parsing of the stack trace is done, the method and system produces the data structure to generate the hierarchy used while generating the automated test.  In one implementation, the method and system generates an in-memory map of parsed files, with a queue of parsed stack frames for each thread in a crash, for all collected crash files.  At the end of the parsing stage, the map of files to the ordered list of parsed stack frames per thread is returned to the caller.  The method and system writes a transition file, which is an intermediate knowledge graph data file and represents a map of classes to all the ordered methods appeared i...