In-place function modification
Abstract
Modifying computer program code can be performed at or immediately prior to runtime of the computer code in a runtime environment of a common language infrastructure of a language-neutral framework for developing and executing computer applications. A function in a computer program can be modified at runtime by injecting arbitrary code, while mitigating an alteration of a program's call stack. A just-in-time compilation service is used to compile and execute intermediate language code of the program, and the runtime environment sends callback functions to an event-based profiling agent (profiler) attached to the runtime environment. The profiler can trap desired functions, as determined by configuration data, and inject modification code from stub methods in a stub assembly file. The modified code can be sent back to the runtime environment to be executed by the just-in-time compilation service.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 50 · Forward citations: 4.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method, comprising: comparing a function associated with a computer program being executed to configuration data from a user created configuration file to determine whether the function is to be modified, the function specified within a callback sent from a runtime library, the configuration data identifying functions desired for modification; and responsive to determining that the function is to be modified: trapping the callback before delivery of the callback to a compiler associated with the computer program; injecting modifying intermediate language code from a file separate from the co
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (4 of 4 total)
References Cited — Backward Prior Art (50)
Non-Patent Literature (5)
- "Microsfot Computer Dictionary 5th Edition" , Microsoft Corporation , 2002, pp. 79, 280, 293-294, and 339.
- Carroll et al., A framework for incremental extensible compiler construction, Jun. 2003, 10 pages.
- Couvreur Julien, "IL Modification at Runtime (Step III)", Retrieved at<<http://blog.monstuff.com/archives/000077.html>>, Oct. 14, 2008, pp. 1-8.
- Drape et al., Transforming the .NET intermediate language using path logic programming, Oct. 2002, 12 pages.
- Feijao Antonio, "InjLib-A Library that Implements Remote Code Injection for All Windows Versions" , Retrieved at<<http://69.10.233.10/KB/library/InjLib.aspx?display=Print>>, Oct. 14, 2008 , pp. 1-11.