radareorg/r2ghidra

RISC-V on windows

Opened this issue · 14 comments

i tried r2 with option -a riscv -c"pdg"
got a message: "Ghidra Decompiler Error: Could not match asm.arch riscv to sleigh arch."

R2 version is 5.5.0-w64. works perfectly with 8051.
what's the recipe for riscv?

trufae commented

works fine with latest release

Screenshot 2023-03-22 at 13 34 34

Screenshot 2023-03-22 at 13 34 03

trufae commented

there's no recipe .it just works. but please dont use ancient versions of anything

there's no recipe .it just works. but please dont use ancient versions of anything

I will do my best ;)
Does your experience cover the w64 version?

trufae commented

Of course. I do maintain everything

Last "fresh" 5.8.2 is working fine until core_r2ghidra.dll placed to lib\plugins

radare2-5.8.2-w64\bin\radare2.exe "Debug Assertion Failed"

trufae commented

Use r2-5.8.4. Why are you using an old r2?

Use r2-5.8.4. Why are you using an old r2?

5.8.2 is last release of r2ghidra. isn't it?

I foresee the following question..
core_r2ghidra.dll (5.8.2) placed to to lib\plugins of radare2-5.8.4-w64 produce exactly same exception as above.

trufae commented

Which windows are you using? It works fine for me on windows 11

Win10
core_r2ghidra.dll (5.8.2) placed to to lib\plugins of radare2-5.8.4-w64

WinDbg shows

ModLoad: 00007ffe`f0e70000 00007ffe`f0ea0000   C:\WINDOWS\System32\IMM32.DLL
ModLoad: 00007ffe`eff70000 00007ffe`effa2000   C:\WINDOWS\SYSTEM32\SspiCli.dll
ModLoad: 00007ffe`9ed00000 00007ffe`9f2eb000   C:\Radare2\RADARE~2.4-W\lib\plugins\core_r2ghidra.dll
ModLoad: 00007ffe`c1d10000 00007ffe`c1d3b000   C:\WINDOWS\SYSTEM32\VCRUNTIME140D.dll
ModLoad: 00007ffe`eb720000 00007ffe`eb72f000   C:\WINDOWS\SYSTEM32\VCRUNTIME140_1D.dll
ModLoad: 00007ffe`a8e70000 00007ffe`a8f53000   C:\WINDOWS\SYSTEM32\MSVCP140D.dll
ModLoad: 00007ffe`a6af0000 00007ffe`a6cb7000   C:\WINDOWS\SYSTEM32\ucrtbased.dll
HEAP[radare2.exe]: Invalid address specified to RtlValidateHeap( 00000133FA880000, 00000133FDBA1F30 )
(77bc.7a74): Break instruction exception - code 80000003 (first chance)
ntdll!RtlRegisterSecureMemoryCacheCallback+0x2922:
00007ffe`f2a8a312 cc              int     3

callstack:
image

do you need something else ?

trufae commented

Time. Cant catch up with all the projects i maintain 24/7. I will try to repro and see what i can do. Probably its an issue with the flags passed to msvc but i need to find time to take a look because without reproducing it its harder to guess wheres the issue

Time. Cant catch up with all the projects i maintain 24/7. I will try to repro and see what i can do. Probably its an issue with the flags passed to msvc but i need to find time to take a look because without reproducing it its harder to guess wheres the issue

Sincere thanks for your efforts!
..unfortunately I'm not the one who can give you time, it's not in my power :)

@trufae, May this case be reopened?

trufae commented

Maybe worth reopening and updating the title to clarify it's just affecting windows