You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to install hook on x86_64.elf shared object function and was disappointed with error #75 (EOVERFLOW). Next i tried to use SUBHOOK_64BIT_OFFSET flag and it became another grief for me. =)
Point of my problems
As i see subhook trampoline calls raises undefined undefined behaviour [always SIGSEGV? not sure] in two cases:
1. under x86_64 with SUBHOOK_64BIT_OFFSET
(gdb) run
Starting program: /tmp/build/subhook-trampoline-test/x86_64-desktop/debug/test
main: hook = 0x555555570e70
main: executing foo...
foo: value = 1
main: hook installed
main: executing foo...
foo_replacement: value = 1, trampoline = 0
main: trampoline = 0x555555570ee0
main: executing foo...
foo_replacement: value = 1, trampoline = 0x555555570ee0
foo_replacement: executing trampoline [0x555555570ee0]...
Program received signal SIGSEGV, Segmentation fault.
0x0000555555570eec in ?? ()
(gdb) bt
#0 0x0000555555570eec in ?? ()
#1 0x0000000000000000 in ?? ()
(gdb) generate-core-file
Saved corefile core.15694
Hi. May be it's same as x64 trampoline fail #15, but i'm not sure =)
Background
I tried to install hook on x86_64.elf shared object function and was disappointed with error #75 (EOVERFLOW). Next i tried to use SUBHOOK_64BIT_OFFSET flag and it became another grief for me. =)
Point of my problems
As i see subhook trampoline calls raises undefined undefined behaviour [always SIGSEGV? not sure] in two cases:
1. under x86_64 with SUBHOOK_64BIT_OFFSET
core.15694.gz
2. under x86 with size-optimized foo function build (gcc "-Os" flag)
core.15628.gz
Test project on github
I published a test project on github to demonstrate this problem. Please check it.
Can you fix this bugs?
Thanks a lot!
The text was updated successfully, but these errors were encountered: