vix.ing · top · new · best · stats · spec

Instrumenting self-modifying code

2003/09/16 by Jonas Maebe, J. Maebe, Koen De Bosschere +3
Computer Science · #D.2.5 #FOS: Computer and information sciences #Parallel Computing and Optimization Techniques #Security and Verification in Computing #Software Engineering (cs.SE) #Software System Performance and Reliability #cs.SE

paper · pdf · doi:10.48550/arxiv.cs/0309029

In M. Ronsse, K. De Bosschere (eds), proceedings of the Fifth International Workshop on Automated Debugging (AADEBUG 2003), September 2003, Ghent. cs.SE/0309027

arxiv created 2003/09/16 · openalex publication_date 2003/09/16 · arxiv updated 2009/12/01 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

Adding small code snippets at key points to existing code fragments is called instrumentation. It is an established technique to debug certain otherwise hard to solve faults, such as memory management issues and data races. Dynamic instrumentation can already be used to analyse code which is loaded or even generated at run time.With the advent of environments such as the Java Virtual Machine with optimizing Just-In-Time compilers, a new obstacle arises: self-modifying code. In order to instrument this kind of code correctly, one must be able to detect modifications and adapt the instrumentation code accordingly, preferably without incurring a high penalty speedwise. In this paper we propose an innovative technique that uses the hardware page protection mechanism of modern processors to detect such modifications. We also show how an instrumentor can adapt the instrumented version depending on the kind of modificiations as well as an experimental evaluation of said techniques.

Related