wargio / r2dec-js

radare2 plugin - converts asm to pseudo-C code.
511 stars 48 forks source link

R2dec crash when viewing /usr/bin/ls #225

Closed karliss closed 4 years ago

karliss commented 4 years ago

Describe the bug

R2dec crash when processing a function from /usr/bin/ls .

Not sure if it's related or not but one interesting aspect of this function compared to others that don't cause crash is that afi reports size to be much bigger than real size.

size: 74198
is-pure: false
realsz: 202

The huge size difference is due to abort call being placed in separately from the function. I wonder if that's GCC trying to keep cold the separate. It doesn't look like tailcall since each function has its own abort call. There are a few other similar functions with large size and realzsize difference due to abort code being placed separately. They take long time to decompile but don't crash.

R2dec version: f22d2cb v4.5.0

Component

Reproduce via JSON (pddi)

Problematic function is at 0x000161a0 r2dec_crash_12_08.json.txt

wargio commented 4 years ago

fixed.

karliss commented 4 years ago

That was fast.