google / bloaty

Bloaty: a size profiler for binaries
Apache License 2.0
4.66k stars 337 forks source link

Segfault: `detail` is not filled by `cs_disasm_iter`?? #338

Open the-moisrex opened 1 year ago

the-moisrex commented 1 year ago

I'm trying to run ./bloaty bloaty -d compileunits but I get a segfault error, it blows at line 76 here:

https://github.com/google/bloaty/blob/52948c107c8f81045e7f9223ec02706b19cfa882/src/disassemble.cc#L75-L88

It seems to me that details is filled with a random invalid pointer (0x454545) or it's nullptr depending on which binary is inputted.