Bytecode verification using class relationship caching

US11662983B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11662983-B2
Application numberUS-202217826526-A
CountryUS
Kind codeB2
Filing dateMay 27, 2022
Priority dateNov 25, 2019
Publication dateMay 30, 2023
Grant dateMay 30, 2023

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A computer-implemented method for bytecode class verification includes: encountering a class requiring verification of its bytecode during a run of an application; determining whether class relationship data for the class exists in a shared classes cache; in response to a determination that the class relationship data for the class does not exist in the shared classes cache: performing a linear bytecode walk of the bytecode to identify relationship data for the class and verify that the bytecode is well-formed; and storing the identified relationship data as the class relationship data for the class in the shared classes cache; in response to a determination that the class relationship data for the class does exist in the shared classes cache: retrieving the class relationship data for the class from the shared classes cache; and processing the class relationship data.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: in response to a determination that class relationship data for a class does not exist in a shared classes cache during bytecode class verification, identifying and storing relationship data as the class relationship data for the class in the shared classes cache; in response to a determination that the class relationship data for the class does exist in the shared classes cache: retrieving the class relationship data for the class from the shared classes cache; and processing the class relationship data, wherein the class relationship data comprises at least one relationship snippet that defines a relationship between a source class and a target class, and the processing comprises determining whether the source class and the target class are both loaded. 2. The method of claim 1 , wherein the identifying comprises performing a linear bytecode walk during a first run of an application. 3. The method of claim 2 , further comprising preventing another linear bytecode walk during a subsequent run of the application. 4. The method of claim 2 , wherein the application comprises an object-oriented programming application. 5. The method of claim 2 , further comprising compiling source code of the application into bytecode used in the linear bytecode walk. 6. The method of claim 1 , wherein the processing comprises: validating a class relationship between the source class and the target class in response to determining that the source class and the target class are both loaded; and registering a class relationship between the source class and the target class in response to determining that the source class and the target class are not both loaded. 7. The method of claim 6 , wherein the registering comprises recording the class relationship in a class relationship table of a class loader without loading the one or more of the source class and the target class that are not loaded. 8. A computer program product comprising one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable to: in response to a determination that class relationship data for a class does not exist in a shared classes cache during bytecode class verification, identify and store relationship data as the class relationship data for the class in the shared classes cache; in response to a determination that the class relationship data for the class does exist in the shared classes cache: retrieve the class relationship data for the class from the shared classes cache; and process the class relationship data, wherein the class relationship data comprises at least one relationship snippet that defines a relationship between a source class and a target class, and the processing comprises determining whether the source class and the target class are both loaded. 9. The computer program product of claim 8 , wherein the identifying comprises performing a linear bytecode walk during a first run of an application. 10. The computer program product of claim 9 , further comprising preventing another linear bytecode walk during a subsequent run of the application. 11. The computer program product of claim 9 , wherein the application comprises an object-oriented programming application. 12. The computer program product of claim 9 , the program instructions are executable to compile source code of the application into bytecode used in the linear bytecode walk. 13. The computer program product of claim 8 , wherein the processing comprises: validating a class relationship between the source class and the target class in response to determining that the source class and the target class are both loaded; and registering a class relationship between the source class and the target class in response to determining that the source class and the target class are not both loaded. 14. The computer program product of claim 13 , wherein the registering comprises recording the class relationship in a class relationship table of a class loader without loading the one or more of the source class and the target class that are not loaded. 15. A system comprising: a processor, a computer readable memory, one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable by the processor to: in response to a determination that class relationship data for a class does not exist in a shared classes cache during bytecode class verification, identify and store relationship data as the class relationship data for the class in the shared classes cache; in response to a determination that the class relationship data for the class does exist in the shared classes cache: retrieve the class relationship data for the class from the shared classes cache; and process the class relationship data, wherein the class relationship data comprises at least one relationship snippet that defines a relationship between a source class and a target class, and the processing comprises determining whether the source class and the target class are both loaded. 16. The system of claim 15 , wherein the identifying comprises performing a linear bytecode walk during a first run of an application. 17. The system of claim 16 , further comprising preventing another linear bytecode walk during a subsequent run of the application. 18. The system of claim 16 , wherein the application comprises an object-oriented programming application. 19. The system of claim 16 , the program instructions are executable to compile source code of the application into bytecode used in the linear bytecode walk. 20. The system of claim 15 , wherein the processing comprises: validating a class relationship between the source class and the target class in response to determining that the source class and the target class are both loaded; and registering a class relationship between the source class and the target class in response to determining that the source class and the target class are not both loaded.

Assignees

Inventors

Classifications

  • G06F8/33Primary

    Intelligent editors · CPC title

  • Object-oriented languages · CPC title

  • Program code verification, e.g. Java bytecode verification, proof-carrying code (high-level semantic checks G06F8/43; prevention of errors by analysis, debugging or testing of software G06F11/36) · CPC title

  • Compilation · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11662983B2 cover?
A computer-implemented method for bytecode class verification includes: encountering a class requiring verification of its bytecode during a run of an application; determining whether class relationship data for the class exists in a shared classes cache; in response to a determination that the class relationship data for the class does not exist in the shared classes cache: performing a linear…
Who is the assignee on this patent?
IBM
What technology area does this patent fall under?
Primary CPC classification G06F8/33. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue May 30 2023 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 12 related publications on this page (citations in our corpus or others sharing the same primary CPC).