Ghidra: Decompiler exception

Created on 23 Sep 2019  路  5Comments  路  Source: NationalSecurityAgency/ghidra

I see the following message in the "Decompiler window:
Exception while decompiling xxxxx: Decompiler results exceeded payload limit of 50 MBytes

is there an easy way to allow more payload ?

Rather than use an indexed table the coders decided to go for several hundred statements similar to the following to print various messages...
if (r4 == 0x2c) goto loc_xyz;

some of them are nested, which is why I think the code breaks the de-compiler.

if (r4 != 0x98) { if (r4 != 0x93) { if (r4 != 0x94) { if (r4 != 0x95) { if (r4 != 0x96) { if (r4 != 0x97) { if (r4 != 0x9d) { if (r4 != 0x9e) { if (r4 != 0xa4) { if (r4 != 0xa8) { if (r4 != 0xab) { if (r4 != 0xac) { if (r4 != 0xad) {

Etc...
"hopper dissasembler" just about manages to break the code down, but ghidra breaks.

Decompiler Bug

Most helpful comment

To increase the payload size:
Edit->Tool Options->Decompiler->Decompiler Max-Payload (from the Code Browser).

All 5 comments

To increase the payload size:
Edit->Tool Options->Decompiler->Decompiler Max-Payload (from the Code Browser).

mark

Thanks guys..
300mb got it..........
The funny thing is that it's not a lot of code when its done. (3245 lines).
Clearly it's just badly nested (most of which seems to optimize out on the de-compile)
It looks like one of those things where it's evolved over years & just kept having exceptions added.

Looks like @ghidracadabra's tip resolved your issue...closing.

Thanks. It solved the problem for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gemini00 picture gemini00  路  3Comments

astrelsky picture astrelsky  路  3Comments

Merculous picture Merculous  路  3Comments

rrivera1849 picture rrivera1849  路  3Comments

tambry picture tambry  路  3Comments