Embedded Memory Testing via Debugger Watchpoints
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Reliability
If code instrumentation is used to implement sanitizers, then memory monitoring capability is improved, but device complexity and binary size increase
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.
3Reliability
If comprehensive memory monitoring is implemented, then error detection capability is improved, but execution speed decreases due to resource constraints
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.
Data Source
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.

