IP Library Granted Patent US 9,946,525
Granted Patent B2
US 9,946,525 · App. 15/469,407 · Granted Apr 17, 2018

Extracting source code

Inventors: Julian Tibble (Oxford, GB); Pavel Avgustinov (Oxford, GB); Peter Cawley (Oxford, GB)
Assignee: Semmle Limited
G06F8/54G06F8/423G06F8/75
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 9,946,525
App. No.
15/469,407
Granted
Apr 17, 2018
Kind
B2
Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for extracting source code. One of the methods includes receiving, by a newly created process, a request to execute code of an executable file in the newly created process, wherein the request specifies a parameter. The newly created process loads a process interception library. Library initialization code of the process interception library determines whether the parameter should be intercepted. In response to determining that the parameter should be intercepted, the parameter is provided to another process.

Claims (44)

1. A method performed on a computer system comprising one or more computers, the method comprising:

receiving, by a custom create-process function that overrides a default create-process function of a parent process, a request to execute code of an executable file in a new process, wherein the request specifies a location of a source code file;

loading a custom process interception library into the new process, wherein loading the custom process interception library into the new process causes every subsequent new process to have its default create-process function preempted by the custom create-process function;

determining, by the custom create-process function, that the executable file is a compiler; and

in response to determining that the executable file is a compiler, providing the location of the source code file to a source code extractor.

2. The method of claim 1 , wherein loading the custom process interception library into the new process causes all child processes of the new process also to load the custom process interception library.

3. The method of claim 1 , wherein loading the custom process interception library causes library initialization code of the process interception library to override the default create-process function with the custom create-process function.

4. The method of claim 3 , wherein overriding the default create-process function in the new process with the custom create-process function comprises generating, by library initialization code of a process interception library, a modified export table entry for the default create-process function, wherein the modified export table entry for the default create-process function includes an address of the custom create-process function.

5. The method of claim 1 , further comprising:

invoking a new extractor process using the default create-process function,

wherein providing the location of the source code file to the source code extractor comprises providing the location of the source code file as a parameter to the new extractor process.

6. The method of claim 5 , further comprising invoking a new compiler process using the default create-process function.

7. The method of claim 6 , further comprising:

identifying an argument or an environment variable specified in the request to execute code of the executable file in the new process; and

modifying the argument or the environment variable specified in the request to execute code of the executable file in the new process,

wherein invoking the new compiler process using the default create-process function comprises invoking the new compiler process using the modified argument or environment variable.

8. A system comprising:

one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising:

receiving, by a custom create-process function that overrides a default create-process function of a parent process, a request to execute code of an executable file in a new process, wherein the request specifies a location of a source code file;

loading a custom process interception library into the new process, wherein loading the custom process interception library into the new process causes every subsequent new process to have its default create-process function preempted by the custom create-process function;

determining, by the custom create-process function, that the executable file is a compiler; and

in response to determining that the executable file is a compiler, providing the location of the source code file to a source code extractor.

9. The system of claim 8 , wherein loading the custom process interception library into the new process causes all child processes of the new process also to load the custom process interception library.

10. The system of claim 8 , wherein loading the custom process interception library causes library initialization code of the process interception library to override the default create-process function with the custom create-process function.

11. The system of claim 10 , wherein overriding the default create-process function in the new process with the custom create-process function comprises generating, by library initialization code of a process interception library, a modified export table entry for the default create-process function, wherein the modified export table entry for the default create-process function includes an address of the custom create-process function.

12. The system of claim 8 , wherein the operations further comprise:

invoking a new extractor process using the default create-process function,

wherein providing the location of the source code file to the source code extractor comprises providing the location of the source code file as a parameter to the new extractor process.

13. The system of claim 12 , wherein the operations further comprise invoking a new compiler process using the default create-process function.

14. The system of claim 13 , wherein the operations further comprise:

identifying an argument or an environment variable specified in the request to execute code of the executable file in the new process; and

modifying the argument or the environment variable specified in the request to execute code of the executable file in the new process,

wherein invoking the new compiler process using the default create-process function comprises invoking the new compiler process using the modified argument or environment variable.

15. One or more non-transitory computer storage media encoded with computer program instructions that when executed by one or more computers cause the one or more computers to perform operations comprising:

receiving, by a custom create-process function that overrides a default create-process function of a parent process, a request to execute code of an executable file in a new process, wherein the request specifies a location of a source code file;

loading a custom process interception library into the new process, wherein loading the custom process interception library into the new process causes every subsequent new process to have its default create-process function preempted by the custom create-process function;

determining, by the custom create-process function, that the executable file is a compiler; and

in response to determining that the executable file is a compiler, providing the location of the source code file to a source code extractor.

16. The one or more non-transitory computer storage media of claim 15 , wherein loading the custom process interception library into the new process causes all child processes of the new process also to load the custom process interception library.

17. The one or more non-transitory computer storage media of claim 15 , wherein loading the custom process interception library causes library initialization code of the process interception library to override the default create-process function with the custom create-process function.

18. The one or more non-transitory computer storage media of claim 17 , wherein overriding the default create-process function in the new process with the custom create-process function comprises generating, by library initialization code of a process interception library, a modified export table entry for the default create-process function, wherein the modified export table entry for the default create-process function includes an address of the custom create-process function.

19. The one or more non-transitory computer storage media of claim 17 , wherein the operations further comprise:

invoking a new extractor process using the default create-process function,

wherein providing the location of the source code file to the source code extractor comprises providing the location of the source code file as a parameter to the new extractor process.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 27, 2020
From: GITHUB SOFTWARE UK LTD.
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 051710/0252 →
CHANGE OF NAME Recorded Dec 10, 2019
From: SEMMLE LIMITED
To: GITHUB SOFTWARE UK LTD.
Reel/Frame 051244/0305 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 3, 2017
From: TIBBLE, JULIAN; AVGUSTINOV, PAVEL; CAWLEY, PETER
To: SEMMLE LIMITED
Reel/Frame 041834/0522 →
Continuity (4)
Continuation 15346559 · Nov 8, 2016
Continuation 14794596 · Jul 8, 2015
Continuation 14292691 · May 30, 2014
Related Publication 20170199732A1 · Jul 13, 2017