Skip to content

Conversation

@batuzovk
Copy link
Contributor

  1. Search for the function with the requested name instead of the empty name.
  2. Save updated file.

1. Search for the function with the requested name instead of the empty
   name.
2. Save updated file.
@batuzovk
Copy link
Contributor Author

A sample input I used to test this example:

#include <stdio.h>

int a[256];

void *origMalloc(unsigned long size)
{
    printf("origMalloc\n");
    return &a[size];
}

void *fastMalloc(unsigned long size)
{
    printf("fastMalloc\n");
    return &a[size];
}

int main(void)
{
    int x;
    scanf("%d", &x);
    scanf("%d", (int *)origMalloc(x));
    printf("%d\n", *(int *)origMalloc(x));
    return 0;
}

@hainest hainest self-assigned this Feb 24, 2025
@hainest
Copy link
Collaborator

hainest commented Feb 24, 2025

Thanks for the careful checks.

@hainest hainest merged commit 46bd0f3 into dyninst:master Feb 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants