Watchpoint-Based Exceptional Flow Control in Protected Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for providing exceptional flow control in protected code, such as patching, are incompatible with copy-protected or read-only code and can negate memory advantages gained through process cloning, as they destroy the implicit sharing relationship and are not non-destructive.

Innovation Solution

A system and method that uses watchpoints to provide exceptional flow control in protected code by setting watchpoints at execution points within the generated code, with exception handlers associated with each watchpoint to manage temporary modifications without compromising copy protection, allowing for non-destructive execution redirection.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If code patching is used to provide exceptional flow control, then execution redirection capability is improved, but copy protection is destroyed and memory sharing advantages are lost

Engineering Contradiction:
Improveexceptional flow control capabilityVSAvoidcopy protection integrity
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent introduces watchpoints as an intermediary mechanism between the protected code and the exception handling system. Instead of directly patching the protected code, watchpoints monitor execution flow and trigger exceptions when specific conditions are met, allowing exceptional flow control without modifying the protected code itself. This mediator approach preserves copy protection while achieving the desired control flow redirection.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a copy of the execution monitoring functionality through watchpoints rather than modifying the original protected code. The watchpoint mechanism copies the essence of execution control into a separate, non-intrusive layer that can trigger exceptions without altering the protected code's integrity or destroying copy-on-write relationships.

Inventive Principle:
Principle #26Copying

2Productivity

If code patching is used for garbage collection safepoints, then garbage collection efficiency is improved, but process cloning memory advantages are negated

Engineering Contradiction:
Improvegarbage collection efficiencyVSAvoidmemory sharing efficiency
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

Watchpoints serve as an intermediary that enables garbage collection safepoint functionality without directly patching protected code. The watchpoint mechanism monitors execution and triggers garbage collection operations through exception handlers, maintaining both garbage collection efficiency and process cloning memory sharing advantages by avoiding code modification.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If polling is used to detect garbage collection requests, then request detection capability is improved, but processor overhead increases

Engineering Contradiction:
Improvegarbage collection request detectionVSAvoidprocessor cycle consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

Instead of continuous polling, the patent implements periodic exception-driven detection where watchpoints are triggered only when relevant conditions occur (such as when garbage collection is needed). This transforms continuous active monitoring into event-driven periodic action, reducing processor overhead while maintaining reliable detection of garbage collection requests.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The watchpoint mechanism is self-triggering based on execution conditions rather than requiring external polling. When a watchpoint condition is met (such as reaching a safepoint), the exception handler automatically activates, eliminating the need for continuous processor intervention and reducing overall system overhead.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7647586B2System and method for providing exceptional flow control in protected code through watchpoints
Publication Date: 2010.01.12 ORACLE AMERICAN INC
  • US7647586B2 patent drawing
  • US7647586B2 patent drawing
  • US7647586B2 patent drawing

AI summary

A system and method for providing exceptional flow control in protected code through watchpoints is described. Code is generated. The generated code includes a sequence of normal operations and is subject to protection against copying during execution of the generated code. Execution points within the generated code are identified. A watchpoint corresponding to each of the execution points is set. An exception handler associated with each watchpoint is defined and includes operations exceptional to the normal operations sequence that are performed upon a triggering of each watchpoint during execution of the generated code.