Skip to content

TrampGuard to prevent recursive instrumentation #9

Closed
@tylergu

Description

@tylergu

SPI now suffers from recursive instrumentation, where the instrumented function is called when we are inside the instrumentation code.

One example is: SPI instruments the new operator at plt section. When we are running the instrumentation code, it calls the new operator and triggered the instrumentation code again. This causes an infinite recursion.

Ideal solution is to implement the trampGuard similar to the one in dyninstAPI. The trampGuard checks if we are inside instrumentation code or not. It skips instrumentation if it detects that it is inside the instrumentation code.

A workaround now is to discover all the functions that can cause recursive instrumentation and specifically avoid instrumenting them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    future improvementIssues that have a work around right now, but can be better solved in the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions