Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack transform timing utility architecture mismatch #41

Open
acarno opened this issue Oct 24, 2018 · 2 comments
Open

Stack transform timing utility architecture mismatch #41

acarno opened this issue Oct 24, 2018 · 2 comments

Comments

@acarno
Copy link
Contributor

acarno commented Oct 24, 2018

At line 293 in lib/stack_transformation/utils/stack_transform_timing.h:

#define TIME_REWRITE( aarch64_bin, x86_64_bin ) \
  ({ \
    int ret; \
    struct timespec start = { .tv_sec = 0, .tv_nsec = 0 }; \
    struct timespec init = { .tv_sec = 0, .tv_nsec = 0 }; \
    struct timespec rewrite = { .tv_sec = 0, .tv_nsec = 0 }; \
    struct timespec end = { .tv_sec = 0, .tv_nsec = 0 }; \
    struct regset_x86_64 regset; \
    struct regset_powerpc64 regset_dest; \
    stack_bounds bounds = get_stack_bounds(); \
    READ_REGS_X86_64(regset); \
    regset.rip = get_call_site(); \
    clock_gettime(CLOCK_MONOTONIC, &start); \
    st_handle src = st_init(x86_64_bin); \
    st_handle dest = st_init(powerpc64_bin); \
    ...

From the arguments, this macro wants to compare the stack rewriting time for AArch64 and x86-64 binaries; internally, however, the macro uses regset_powerpc64 and powerpc64_bin.

@rlyerly
Copy link
Collaborator

rlyerly commented Nov 14, 2018

This looks like a copy-and-paste error -- I think aarch64_bin should simply be powerpc64_bin. Can you submit a pull request with the fix?

@acarno
Copy link
Contributor Author

acarno commented Nov 14, 2018

I'll try to do so as soon as I can -- currently a bit tied up with coursework and prep for my M.S. defense. May be sometime next month before I can get to it -- sorry!!

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

No branches or pull requests

2 participants