Embedded Memory Testing via Debugger Watchpoints

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing sanitizers used for desktop and server hardware are not suitable for embedded systems due to resource constraints, often causing errors or failing to detect issues, especially in safety-critical applications like vehicle control devices.

Innovation Solution

A method that uses a debugger to set watchpoints for memory locations in embedded systems, allowing for memory monitoring without the need for instrumentation or emulation, enabling effective testing and error detection through fuzzing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If sanitizers are used for memory monitoring on embedded systems, then error detection capability is improved, but resource consumption increases making them unsuitable for embedded systems

Engineering Contradiction:
Improveerror detection capabilityVSAvoidresource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts the essential memory monitoring functionality from traditional sanitizers by using debugger watchpoints to track specific memory locations. Instead of implementing full sanitizer functionality, only the critical memory access monitoring capability is retained through watchpoints, significantly reducing resource consumption while maintaining error detection capability for shared memory areas.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies local quality by monitoring only specific memory locations that are shared between different execution contexts rather than implementing global memory monitoring. Watchpoints are set selectively on shared memory areas identified through static analysis, concentrating monitoring resources on critical locations while leaving other memory areas unmonitored, thus reducing overall resource consumption.

Inventive Principle:
Principle #3Local quality

2Reliability

If code instrumentation is used to implement sanitizers, then memory monitoring capability is improved, but device complexity and binary size increase

Engineering Contradiction:
Improvememory monitoring capabilityVSAvoiddevice complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent uses the debugger as an intermediary tool to set and manage watchpoints for memory monitoring, rather than embedding monitoring code directly into the program. The debugger externalizes the monitoring functionality, allowing memory access tracking without modifying the program code or increasing binary size, thus avoiding the complexity associated with code instrumentation.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If comprehensive memory monitoring is implemented, then error detection capability is improved, but execution speed decreases due to resource constraints

Engineering Contradiction:
Improveerror detection capabilityVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent implements partial memory monitoring by setting watchpoints only on shared memory areas that are critical for error detection, rather than monitoring all memory accesses. This selective approach uses the minimum necessary monitoring coverage to detect use-after-free and similar errors, maintaining execution speed while providing sufficient error detection capability for safety-critical scenarios.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20240419579A1Method for testing a computer program
Publication Date: 2024.12.19 ROBERT BOSCH GMBH
  • US20240419579A1 patent drawing
  • US20240419579A1 patent drawing

AI summary

A method for testing a computer program. The method includes executing the computer program until a memory share command for a memory area previously allocated by a memory allocation command of the computer program is called; setting, for each one or more memory locations of the memory area shared by the memory share command, a respective watchpoint for the memory location of the memory area and executing the memory share command; displaying, for each set watchpoint, that the computer program has an error, if the set watchpoint is triggered, and removing the watchpoint for each of the set watchpoints if the memory location for which it is set is reallocated by a further memory allocation command in the computer program.