Debugger Watchpoint Testing for Embedded Memory Errors
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing sanitizers for memory monitoring are resource-intensive and platform-specific, making them unsuitable for embedded systems, which often have limited resources and fail to detect errors silently, leading to potential security vulnerabilities.
Innovation Solution
A method for memory monitoring using a debugger-controlled sanitizer, which sets watchpoints and breakpoints on return addresses and stack base pointers, enabling effective testing on embedded systems without instrumentation or emulation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional sanitizers are used for memory monitoring on embedded systems, then comprehensive error detection is achieved, but resource consumption becomes too high for embedded systems to handle
Solution Approach 1:
The patent extracts the essential memory monitoring functionality from traditional sanitizers and implements it selectively only at critical locations (return addresses and stack base pointers) using debugger-controlled watchpoints, rather than applying comprehensive instrumentation throughout the entire program. This extraction approach maintains error detection capability while dramatically reducing resource consumption on embedded systems.
Solution Approach 2:
Instead of implementing full sanitizer coverage, the patent applies partial monitoring action by setting watchpoints only at specific critical memory locations where security errors are most likely to occur. This partial action approach provides sufficient error detection for embedded systems without the overhead of complete memory monitoring.
2Reliability
If code instrumentation is used to implement sanitizers, then memory monitoring functionality is achieved, but source code availability or binary instrumentation vulnerability is required
Solution Approach 1:
The patent introduces a debugger as an intermediary tool that enables memory monitoring without requiring source code modification or binary instrumentation. The debugger acts as a mediator between the embedded system and the testing environment, allowing watchpoints to be set and errors to be detected while keeping the original program intact and avoiding the complexities of code instrumentation.
3Productivity
If embedded systems run with limited resources, then system efficiency is maintained, but traditional sanitizers cannot be used or may cause silent failures
Solution Approach 1:
The patent performs preliminary setup by stopping the program execution and identifying specific memory locations (return addresses and stack base pointers) before resuming execution with watchpoints in place. This preliminary action allows the system to maintain efficiency during normal operation while ensuring error detection capability is pre-configured at critical locations.
Data Source
AI summary
A method for testing a computer program. The method includes executing the computer program until a subprogram is called, ascertaining a memory location of the call stack in which the return address or the stack base pointer of the called subprogram is stored, setting a watchpoint on the ascertained memory location, setting breakpoints on return instructions of the called subprogram, continuing the execution of the computer program and indicating that the computer program has an error if the set watchpoint has been triggered before one of the set breakpoints due to a write to the memory location.
