Detecting Unsupported Instructions in Multiversioned Software Testing

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering Contradiction Analysis

1Measurement precision

If multiversioned functions are tested on simulated hardware platforms, then code coverage is improved, but detection of unsupported instructions fails

Engineering Contradiction:
Improvecode coverageVSAvoiddetection accuracy
Core Design Contradiction:
Measurement precisionVSReliability

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If all physical hardware variations are used for testing, then detection accuracy is improved, but testing cost and feasibility worsen

Engineering Contradiction:
Improvedetection accuracyVSAvoidtesting feasibility
Core Design Contradiction:
ReliabilityVSEase of manufacture

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.

Inventive Principle:
Principle #26Copying

3Ease of manufacture

If simulation is used for testing, then testing cost is reduced, but detection of versioning errors worsens

Engineering Contradiction:
Improvetesting costVSAvoiderror detection
Core Design Contradiction:
Ease of manufactureVSReliability

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9182990B1Method and apparatus for detecting execution of unsupported instructions while testing multiversioned code
Publication Date: 2015.11.10 GOOGLE LLC
  • US9182990B1 patent drawing
  • US9182990B1 patent drawing
  • US9182990B1 patent drawing

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.