Test Executive Heap Validity Checking for Memory Leak Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Test executive sequences face difficulties in detecting and isolating errors, particularly heap corruption and memory leaks, caused by user-supplied code modules, which can lead to intermittent and hard-to-reproduce issues, often misattributed to vendor bugs, affecting the reliability and efficiency of automated testing.

Innovation Solution

The implementation of a system and method within the test executive engine to automatically detect heap corruption and memory leaks by checking heap validity before and after executing user-supplied code modules, reporting errors, and logging issues, thereby identifying and isolating the source of errors within user-supplied code modules.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If user-supplied code modules are executed in test executive sequences, then testing functionality and versatility are improved, but error detection difficulty and reliability issues worsen due to heap corruption and memory leaks

Engineering Contradiction:
Improvetesting functionalityVSAvoiderror detection reliability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces heap validity checking mechanisms as intermediary components between the test executive engine and user-supplied code modules. These checking mechanisms monitor heap memory state before and after module execution, acting as mediators to detect corruption and memory leaks without interfering with the normal testing functionality. The intermediary checking code validates memory integrity and provides error detection while maintaining system versatility.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Difficulty of detecting and measuring

If heap validity checking and memory leak detection are implemented, then error detection capability is improved, but system complexity and overhead increase

Engineering Contradiction:
Improveerror detection capabilityVSAvoidsystem complexity
Core Design Contradiction:
Difficulty of detecting and measuringVSDevice complexity

Solution Approach 1:

The patent segments the heap validity checking functionality into distinct modular components: pre-execution checking code, post-execution checking code, and error handling routines. Each segment performs a specific function - validating heap state before module execution, detecting corruption after execution, and managing error responses. This segmentation reduces overall system complexity by organizing checking mechanisms into manageable, independent units that can be selectively applied.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements preliminary heap validity checking before user-supplied code modules are executed. By performing validation checks in advance, the system establishes a baseline heap state and can immediately detect any corruption caused by module execution. This preliminary action approach simplifies error detection by comparing pre and post execution states, reducing the complexity of continuous monitoring.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If automatic error detection is implemented for all steps, then measurement precision is improved, but execution time and productivity are reduced

Engineering Contradiction:
Improveerror detection precisionVSAvoidexecution speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies heap validity checking selectively rather than universally to all test executive steps. The system identifies and applies checking mechanisms only to steps that call user-supplied code modules, where errors are most likely to occur. This partial application approach maintains high error detection precision for critical operations while avoiding the productivity penalty of checking every single step, thus balancing measurement precision with execution speed.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS7519867B2Test executive which provides heap validity checking and memory leak detection for user code modules
Publication Date: 2009.04.14 NATIONAL INSTRUMENTS CORP
  • US7519867B2 patent drawing
  • US7519867B2 patent drawing
  • US7519867B2 patent drawing

AI summary

A system and method for automatically detecting heap corruption errors and memory leak errors caused by user-supplied code modules that are called by steps of a test executive sequence. The test executive sequence may first be created by including a plurality of test executive steps in the test executive sequence and configuring at least a subset of the steps to call user-supplied code modules. The test executive sequence may then be executed on a host computer under control of a test executive engine. For each step that calls a user-supplied code module, the test executive engine may perform certain actions to automatically detect whether the user-supplied code module causes a heap corruption error and/or automatically detect whether the user-supplied code module causes a memory leak error.