8689180

Systems and Methods for Resource Leak Detection

PublishedApril 1, 2014
Assigneenot available in USPTO data we have
Technical Abstract

Patent Claims
17 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method for detecting resource leaks in a program comprising: initiating analysis of a control flow of the program; generating an initial set of must-access paths for a resource in response to acquisition of the resource in the control flow; tracking the resource in the control flow by dynamically modifying the set of must-access paths by, at least one of, adding or removing must-access paths in accordance with the control flow analysis; ceasing the tracking of the resource prior to reaching an exit in the control flow in response to determining that any variable in the set of must-access paths releases the resource; and determining that the resource is leaked if the resource is unreachable at the exit in the control flow based on the set of must-access paths.

2

2. The method of claim 1 , wherein the tracking includes tracking the resource through inter-procedural calls.

3

3. The method of claim 2 , wherein the resource is tracked through an inter-procedural call only if the inter-procedural call results in an alteration in the set of must-access paths or if the inter-procedural call results in a release of the resource.

4

4. The method of claim 3 , wherein the modifying further comprises adding a must-access path for a variable used in the inter-procedural call.

5

5. The method of claim 1 , wherein the resource is unreachable if the set of must-access paths is empty.

6

6. The method of claim 1 , wherein the tracking further comprises determining whether a branch is taken by assessing whether conditions for a taken branch are true based on the set of must-access paths.

7

7. The method of claim 1 , further comprising: filtering the set of must-access paths by emptying the set if the set includes a number of must-access paths that exceeds a first threshold or if the set includes a must-access path with a length that exceeds a second threshold.

8

8. The method of claim 1 , wherein the tracking ignores exceptional paths that are of a pre-determined type.

9

9. A system for detecting resource leaks in a program comprising: a control flow representation generator configured to generate a control flow representation of the program; a must-access path module configured to store a plurality of sets of must-access paths; a tracker, implemented by at least one hardware processor, configured to perform a control flow analysis on the control flow and track a resource by generating and modifying the sets of must-access paths such that a given set of must-access paths for a resource is generated in response to acquisition of the resource in the control flow and such that the given set of must-access paths are dynamically modified by, at least one of, adding or removing must-access paths in accordance with the control flow analysis to track the resource, wherein the tracker is further configured to track the resource through inter-procedural calls; and a reporting module configured to report the resource as leaked if the resource is determined to be unreachable at an exit in the control flow based on the set of must-access paths.

10

10. The system of claim 9 , wherein the tracker is further configured to cease the tracking of the resource prior to reaching the exit in the control flow in response to determining that any variable in the given set of must-access paths releases the resource.

11

11. The system of claim 9 , wherein the resource is tracked through an inter-procedural call only if the inter-procedural call results in an alteration in the set of must-access paths or if the inter-procedural call results in a release of the resource.

12

12. The system of claim 11 , wherein the modifying further comprises adding a must-access path for a variable used in the inter-procedural call.

13

13. The system of claim 9 , wherein the resource is unreachable if the given set of must-access paths is empty.

14

14. The system of claim 9 , wherein the tracker is further configured to determine whether a branch is taken by assessing whether conditions for a taken branch are true based on the given set of must-access paths.

15

15. The system of claim 9 , wherein the tracker is further configured to filter the given set of must-access paths by emptying the given set if the given set includes a number of must-access paths that exceeds a first threshold or if the set includes a must-access path with a length that exceeds a second threshold.

16

16. The system of claim 9 , wherein the tracker is further configured to ignore exceptional paths that are of a pre-determined type during the analysis.

17

17. A method for detecting resource leaks in a program comprising: initiating analysis of a control flow of the program; generating an initial set of must-access paths for a resource in response to acquisition of the resource in the control flow; tracking the resource in the control flow by dynamically modifying the set of must-access paths by, at least one of, adding or removing must-access paths in accordance with the control flow analysis, wherein the tracking further comprises determining whether a branch is taken by assessing whether conditions for a taken branch are true based on the set of must-access paths; and determining that the resource is leaked if the resource is unreachable at an exit in the control flow based on the set of must-access paths.

Patent Metadata

Filing Date

Unknown

Publication Date

April 1, 2014

Inventors

SATISH CHANDRA
Emina Torlak

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “SYSTEMS AND METHODS FOR RESOURCE LEAK DETECTION” (8689180). https://patentable.app/patents/8689180

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.