Detecting Unsupported Instructions in Multiversioned Software Testing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Testing multiversioned functions in software applications is challenging due to the difficulty in detecting execution of unsupported instructions on simulated platforms, which can lead to bugs going undetected, as simulated testing may not accurately identify versioning errors across all hardware variations.
Innovation Solution
Annotating executable binaries to distinguish functions for specific hardware variations, rewriting detected unsupported instructions with trap instructions, and terminating the application upon execution of these instructions to ensure complete code coverage and error detection during testing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If multiversioned functions are tested on simulated hardware platforms, then code coverage is improved, but detection of unsupported instructions fails
Solution Approach 1:
The patent introduces trap instructions as an intermediary mechanism between the simulated platform and the multiversioned code. These trap instructions act as mediators that intercept execution of unsupported instructions and generate detectable exceptions, allowing the testing system to accurately detect versioning errors while maintaining code coverage through simulation.
Solution Approach 2:
The patent applies preliminary action by injecting trap instructions into the code before execution on the simulated platform. This preparatory step ensures that when unsupported instructions are encountered during testing, the trap instructions are already in place to catch and report these errors, enabling accurate detection without requiring actual hardware variants.
2Reliability
If all physical hardware variations are used for testing, then detection accuracy is improved, but testing cost and feasibility worsen
Solution Approach 1:
The patent uses software simulation as a copy of the actual hardware platform behavior. Instead of requiring multiple physical hardware variants, the system creates virtual copies of different hardware platforms through simulation, allowing comprehensive testing of multiversioned code across multiple platform scenarios without the cost and complexity of acquiring and maintaining multiple physical devices.
3Ease of manufacture
If simulation is used for testing, then testing cost is reduced, but detection of versioning errors worsens
Solution Approach 1:
The trap instructions serve as an intermediary layer that bridges the gap between simulation and accurate error detection. By inserting these special instructions at critical points in the code, the system maintains the cost benefits of simulation while achieving reliable detection of versioning errors that would otherwise be missed.
Solution Approach 2:
The patent changes the parameter of instruction execution by introducing trap instructions that modify the normal execution flow. When an unsupported instruction is encountered, the trap instruction changes the execution parameter from silent failure to explicit exception generation, enabling reliable error detection within the simulated environment.
Data Source
AI summary
A system and method for detecting execution of unsupported instructions while testing multiversioned functions within software application code are disclosed. An example method includes annotating a software application's executable binary to distinguish functions that are directed to particular hardware variations. Functions with instructions that are unsupported by a simulated hardware platform variation on which the software application's annotated executable binary will run may then be detected. The contents of the detected functions may be rewritten with trap instructions. At runtime, when executing the software application on the simulated hardware platform variation running on a different physical hardware platform variation, responsive to execution of a function with instructions that are unsupported by the simulated hardware platform, terminating the software application based on the execution of the trap instructions. Execution of unsupported instructions may be detected based on the termination of the software application.


