HexHive / retrowrite

RetroWrite -- Retrofitting compiler passes through binary rewriting
Other
655 stars 78 forks source link

Does the retrowrite can run in ARM now? [BUG] #33

Open LmDeng0 opened 2 years ago

LmDeng0 commented 2 years ago

test errors

Test in ARM arch,use commend "retrowrite stack stack.asan.s",get the following error:

Traceback (most recent call last): File "/root/retrowrite/retro/bin/retrowrite", line 173, in from librw_arm64.analysis.register import RegisterAnalysis File "/root/retrowrite/librw_arm64/analysis/register.py", line 9, in from archinfo import ArchAArch64, Register File "/root/retrowrite/retro/lib/python3.6/site-packages/archinfo/init.py", line 26, in from .arch_amd64 import ArchAMD64 File "/root/retrowrite/retro/lib/python3.6/site-packages/archinfo/arch_amd64.py", line 378, in register_arch([r'.amd64|.x64|.x86_64|.metapc'], 64, Endness.LE, ArchAMD64) File "/root/retrowrite/retro/lib/python3.6/site-packages/archinfo/arch.py", line 800, in register_arch all_arches.append(my_arch(endness)) File "/root/retrowrite/retro/lib/python3.6/site-packages/archinfo/arch_amd64.py", line 68, in init self.reg_blacklist.append(register.name) AttributeError: 'NoneType' object has no attribute 'append'

Test demo in directory of mytest, get the same error, and the readme.md file seems not updata? Does this version can run in the arm arch now? the current test on arm does not seem to have been successful.

diagprov commented 2 years ago

Hi, thanks for moving the issue here. Can you please send the output of uname -m (so we know what machine you are running on)?

In the mytest directory can you also run file hello.out and share both of these here.

I am hoping to see something like this

bin.test: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=3400d8cd4607663e6b35b8b432f580e62619ff89, for GNU/Linux 3.7.0

for the file command.

LmDeng0 commented 2 years ago

file hello.out

hello.out: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, with debug_info, not stripped

uname -m

aarch64

retrowrite hello.out hello.s

Traceback (most recent call last): File "/root/retrowrite/retro/bin/retrowrite", line 173, in from librw_arm64.analysis.register import RegisterAnalysis File "/root/retrowrite/librw_arm64/analysis/register.py", line 9, in from archinfo import ArchAArch64, Register File "/root/retrowrite/retro/lib/python3.6/site-packages/archinfo/init.py", line 26, in from .arch_amd64 import ArchAMD64 File "/root/retrowrite/retro/lib/python3.6/site-packages/archinfo/arch_amd64.py", line 378, in register_arch([r'.amd64|.x64|.x86_64|.metapc'], 64, Endness.LE, ArchAMD64) File "/root/retrowrite/retro/lib/python3.6/site-packages/archinfo/arch.py", line 800, in register_arch all_arches.append(my_arch(endness)) File "/root/retrowrite/retro/lib/python3.6/site-packages/archinfo/arch_amd64.py", line 68, in init self.reg_blacklist.append(register.name) AttributeError: 'NoneType' object has no attribute 'append'

Additional

At first,when i use retrowrite,get the following error: (retro) root@ecs-f055:~/retro-test/retrowrite/mytest# retrowrite hello.out hello.s File "/root/retro-test/retrowrite/retro/bin/retrowrite", line 162 <<<<<<< HEAD ^ SyntaxError: invalid syntax

In the file of retrowrite of "/root/retro-test/retrowrite/retro/bin/retrowrite",and what should select from "Accept Current Change","Accept Incoming Change","Accept Bothchanges"?

image
Lulu0102 commented 2 years ago

Hello, I have also encountered same issue when running under arm environment. The file type is same as you indicate above and uname -m is also aarch64. Could you help resolve this? Waiting for your response. Thank you a lot! 84D16235-2941-4226-BCE5-7CD6E379E7C1

LmDeng0 commented 2 years ago

Hello, I have also encountered same issue when running under arm environment. The file type is same as you indicate above and uname -m is also aarch64. Could you help resolve this? Waiting for your response. Thank you a lot! 84D16235-2941-4226-BCE5-7CD6E379E7C1

I haven't solved this problem yet, waiting for the author's reply

Lulu0102 commented 2 years ago

Sorry I should reply to the author, because the company’s task is very emergent, hence I thought the author will reply quicker if I say I have the same issue. Hope he can reply to us tomorrow morning.

LmDeng0 @.***>于2022年3月24日 周四17:29写道:

I haven't solved this problem yet, waiting for the author's reply

— Reply to this email directly, view it on GitHub https://github.com/HexHive/retrowrite/issues/33#issuecomment-1077417560, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYMM34YRPVSZS5AECSD674LVBQYZDANCNFSM5RKAC6GQ . You are receiving this because you commented.Message ID: @.***>

LmDeng0 commented 2 years ago

Sorry I should reply to the author, because the company’s task is very emergent, hence I thought the author will reply quicker if I say I have the same issue. Hope he can reply to us tomorrow morning. LmDeng0 @.>于2022年3月24日 周四17:29写道: I haven't solved this problem yet, waiting for the author's reply — Reply to this email directly, view it on GitHub <#33 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYMM34YRPVSZS5AECSD674LVBQYZDANCNFSM5RKAC6GQ . You are receiving this because you commented.Message ID: @.>

Nothing,what are your purpose,i have do some change when using this tools. In addition,are you Chinese?