Bytecode Rewriting With Supplemental Functions for Target Addresses

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Passing function names as string constants in bytecode can lead to runtime errors due to mismatches when function names change, and using function pointers lacks necessary metadata, preventing proper execution and metadata retrieval.

Innovation Solution

Modify bytecode to replace function pointer segments with supplemental functions that return the desired type of address, such as a URL, ensuring type safety and metadata availability at runtime.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If function names are passed as string constants in bytecode, then the code can be compiled and executed, but runtime errors occur when function names change due to mismatches between string constants and actual function names

Engineering Contradiction:
Improveruntime error preventionVSAvoidfunction metadata
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent introduces function pointers as an intermediary between string constants and actual function execution. Function pointers store both the address of the target function and associated metadata, serving as a mediator that connects the bytecode reference to the actual function while preserving type safety and metadata information.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary validation during compilation by checking type safety and verifying that called functions exist. The compiler validates function pointers and their metadata before generating bytecode, preventing runtime errors caused by mismatched function references.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If function pointers are used instead of string constants, then type safety is improved and metadata is preserved, but the bytecode becomes more complex and requires additional processing

Engineering Contradiction:
Improvetype safetyVSAvoidbytecode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The compiler performs preliminary processing to validate function pointers and generate appropriate bytecode during compilation. By resolving function pointer references and validating metadata before runtime, the compiler simplifies the resulting bytecode while maintaining type safety and metadata preservation.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If compiler validation is performed to check type safety, then errors are prevented, but compilation time increases due to additional validation steps

Engineering Contradiction:
Improveerror preventionVSAvoidcompilation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The compiler performs essential validation checks during compilation, including verifying that called functions exist and checking type safety. By completing these validations during compilation rather than at runtime, the system prevents errors while the incremental nature of validation keeps compilation time manageable.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12423077B2Modifying bytecode to return an address associated with a target function
Publication Date: 2025.09.23 RED HAT LLC
  • US12423077B2 patent drawing
  • US12423077B2 patent drawing
  • US12423077B2 patent drawing

AI summary

Bytecode can be modified to adjust a returned address associated with a target function according to some examples. In one such example, a system can analyze bytecode to identify a location of a first bytecode segment that is intended to return an address for a target function. The system can then modify the bytecode to replace the first bytecode segment with a second bytecode segment at the location. The second bytecode segment can be configured to call a supplemental function that is executable to return the address for the target function.