binrec-tob icon indicating copy to clipboard operation
binrec-tob copied to clipboard

coreutils: cannot locate main function

Open ameily opened this issue 3 years ago • 5 comments

I'm seeing that the cp coreutils sample, and potentially others, fail to locate the main function. This heuristic was changed when initial support for coreutils samples was added, trailofbits/binrec-prerelease#127.

failed to perform initial lifting of LLVM bitcode: s2e-out: Expected a single successor for potential main block, BB_804A030: got 43 successors

I think this is different than the initial regression found that occurs sometimes against binrec samples, trailofbits/binrec-tob#33.

ameily avatar Apr 05 '22 16:04 ameily

We should verify that this is still an issue after trailofbits/binrec-prerelease#169.

Assigning @jleightcap to verify. If its still an issue then we can try and dig a little deeper.

michaelbrownuc avatar May 11 '22 21:05 michaelbrownuc

@michaelbrownuc I believe this is still an issue I'm seeing as a side effect of trailofbits/binrec-tob#14. I was seeing a bad trace info being produced that occasionally was missing the call into main(), which would trigger the bug in this issue.

ameily avatar May 12 '22 12:05 ameily

@ameily Thanks for the update. Is it fair then to say this duplicates trailofbits/binrec-tob#14 now that trailofbits/binrec-prerelease#169 is merged?

michaelbrownuc avatar May 12 '22 12:05 michaelbrownuc

@michaelbrownuc I apologize, I really shouldn't comment on anything until coffee is ready.

I just confirmed that this is still occurring, even with the fix from trailofbits/binrec-prerelease#169. I think it is different than trailofbits/binrec-tob#14 since it happens every time. So, I don't think it's a duplicate and most likely we need to make the heuristic for finding main better.

ameily avatar May 12 '22 13:05 ameily

lol no problem, @jleightcap can work on this one once he ramps up a bit on the project (and gets an x86 machine)

michaelbrownuc avatar May 12 '22 13:05 michaelbrownuc