On arch, have to hit ^C 4 times or the GUI never opens
MightyPork opened this issue · 9 comments
Environment
So 22. června 2024, 12:39:30 CEST
radare2 5.9.2 0 @ linux-x86-64
birth: git.5.9.2 2024-05-25__21:41:23
options: gpl release -O1 cs:5 cl:2 meson
iaito 5.9.2
Linux x86_64
iaito is installed from arch repos
Description
When I open an elf, it stays stuck with no CPU activity or output, no windows open, seemingly forever (I lost patience, maybe it proceeds after some minutes).
It is 100% replicable for me.
% iaito sample.elf
Plugins are loaded from "/home/ondra/.local/share/radareorg/iaito/plugins"
Loaded 0 plugin(s).
Plugins are loaded from "/usr/local/share/radareorg/iaito/plugins"
Plugins are loaded from "/usr/share/radareorg/iaito/plugins"
^C^C^C^CWARN: Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e bin.cache=true` next time
INFO: Analyze all flags starting with sym. and entry0 (aa)
INFO: Analyze imports (af@@@i)
INFO: Analyze entrypoint (af@ entry0)
INFO: Analyze symbols (af@@@s)
INFO: Recovering variables
INFO: Analyze all functions arguments/locals (afva@@@F)
INFO: Analyze function calls (aac)
INFO: Analyze len bytes of instructions for references (aar)
INFO: Finding and parsing C++ vtables (avrr)
INFO: Analyzing methods
INFO: Finding xrefs in noncode sections (e anal.in=io.maps.x; aav)
INFO: Emulate functions to find computed references (aaef)
INFO: Recovering local variables (afva)
INFO: Type matching analysis for all functions (aaft)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
INFO: Execution stopped on unaligned instruction (see e?esil.breakoninvalid)
(this continues for several screens)
Test
sample file I tried to open, zipped because github hates elf
You can lower the analysis depth level.
thanks for sharing the binary ive never find a sample that shows this error before and i will fix it properly
Yes with aa it opens instantly, I didn't think it'd be useful to lower it, I remember using aaaa before and it worked fine.
The binary is a firmware for a stm32 microcontroller
its once again the same dbginfo bottleneck passing this flag -e bin.dbginfo=false
makes the analysis finish quickly.
i dont get the 'Execution stopped on unaligned instruction' in r2 from git :?
nvm i can repro. the dbginfo bug was macos-only, on linux i get the error message
There are several issues some of them fixed:
- the console redirector seems to hang on qt6 ( can u try running with qt5)
- The message is printed so many times and this warning exposes a bug that is now fixed in r2
Need to investigate in the qt bug but thats outside my scope rn
i think the qt6 bug should be workarounded with the latest changes in r2 and iaito, can you give it a try? i don't have plans to make a release on both tools yet. but if its a blocker i can tag 5.9.4
I built iaito from git now and the sample file opens just fine almost immediately, even with aaaa 👍
Cool thanks for testing!