IP Library Granted Patent US 12,423,077
Granted Patent B2
US 12,423,077 · App. 18/080,915 · Granted Sep 23, 2025

Modifying bytecode to return an address associated with a target function

Inventors: Stephane Epardaud (Peille, FR); Georgios Andrianakis (Attica, GR)
Assignee: Red Hat, Inc.
G06F8/447G06F8/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,423,077
App. No.
18/080,915
Granted
Sep 23, 2025
Kind
B2
Abstract

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.

Claims (37)

1. A non-transitory computer-readable medium comprising program code that is executable by one or more processors for causing the one or more processors to:

generate bytecode by compiling source code into the bytecode, wherein the source code excludes a supplemental function;

analyze the bytecode to identify a location of a first bytecode segment that is intended to return an address for a target function; and

modify the bytecode to replace the first bytecode segment with a second bytecode segment at the location, the second bytecode segment being configured to call the supplemental function that is executable to return the address for the target function.

2. The non-transitory computer-readable medium of claim 1 , wherein the first bytecode segment is unable to return the address when executed at runtime.

3. The non-transitory computer-readable medium of claim 1 , wherein the address is a uniform resource locator (URl).

4. The non-transitory computer-readable medium of claim 1 , wherein the first bytecode segment corresponds to a getURl function in Java.

5. The non-transitory computer-readable medium of claim 1 , further comprising program code that is executable by the one or more processors for causing the one or more processors to:

generate the supplemental function; and

incorporate the supplemental function into the bytecode.

6. The non-transitory computer-readable medium of claim 1 , further comprising program code that is executable by the one or more processors for causing the one or more processors to:

analyze the bytecode to identify a third bytecode segment that is intended to return a particular type of address for another target function; and

modify the bytecode to replace the third bytecode segment with a fourth bytecode segment, the fourth bytecode segment being configured to call another supplemental function that is executable to return the particular type of address for the other target function.

7. The non-transitory computer-readable medium of claim 1 , wherein the target function is an endpoint function associated with a web application.

8. The non-transitory computer-readable medium of claim 1 , wherein the bytecode defines a reverse-routing program, the reverse-routing program being configured to translate function names to uniform resource identifiers, wherein the function names are for endpoint functions for a web application, and wherein the uniform resource identifiers are usable to access the endpoint functions.

9. The non-transitory computer-readable medium of claim 1 , wherein the first bytecode segment includes a function pointer to the target function.

10. A method comprising:

generating, by one or more processors, bytecode by compiling source code into the bytecode, wherein the source code excludes a supplemental function;

analyzing, by the one or more processors, the bytecode to identify a location of a first bytecode segment that is intended to return an address for a target function; and

modifying, by the one or more processors, the bytecode to replace the first bytecode segment with a second bytecode segment at the location, the second bytecode segment being configured to call the supplemental function that is executable to return the address for the target function.

11. The method of claim 10 , wherein the first bytecode segment is unable to return the address when executed at runtime.

12. The method of claim 10 , wherein the address is a uniform resource locator (URl).

13. The method of claim 10 , wherein the first bytecode segment corresponds to a getURl function in Java.

14. The method of claim 10 , further comprising:

generating the supplemental function; and

incorporating the supplemental function into the bytecode.

15. The method of claim 10 , further comprising:

analyzing the bytecode to identify a third bytecode segment that is intended to return a particular type of address for another target function; and

modifying the bytecode to replace the third bytecode segment with a fourth bytecode segment, the fourth bytecode segment being configured to call another supplemental function that is executable to return the particular type of address for the other target function.

16. The method of claim 10 , wherein the bytecode defines a reverse-routing program, the reverse-routing program being configured to translate function names to uniform resource identifiers, wherein the function names are for endpoint functions for a web application, and wherein the uniform resource identifiers are usable to access the endpoint functions.

17. The method of claim 10 , wherein the first bytecode segment includes a function pointer to the target function.

18. A system comprising:

one or more processors; and

one or more memories including instructions that are executable by the one or more processors for causing the one or more processors to:

generate bytecode by compiling source code into the bytecode, wherein the source code excludes a supplemental function;

analyze the bytecode to identify a location of a first bytecode segment that is intended to return an address for a target function; and

modify the bytecode to replace the first bytecode segment with a second bytecode segment at the location, the second bytecode segment being configured to call the supplemental function that is executable to return the address for the target function.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 14, 2022
From: EPARDAUD, STEPHANE; ANDRIANAKIS, GEORGIOS
To: RED HAT, INC.
Reel/Frame 062086/0228 →