Skip to content

Hooking variadic functions causes an EXC_BAD_ACCESS #35

@KiranPanesar

Description

@KiranPanesar

I created a demo iOS app. Pretty much the only thing it does is call [NSString stringWithFormat:@"asd"];. When I set up a custom tracer to hook into this method, the app crashes when called.

I've run it through Xcode, put down Exception Breakpoints and grabbed the backtrace using LLDB. Here's the trace of the crashing thread. As you can see, it results in an EXC_BAD_ACCESS.

Upon further testing it appears that this is only occurring for methods with variadic parameters. If I hook +stringWithString: and create a sample app which uses that method, the tracer works fine and all the data I ask is logged.

Has anyone else run into this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions