lifting-bits / anvill

anvill forges beautiful LLVM bitcode out of raw machine code
GNU Affero General Public License v3.0
340 stars 39 forks source link

Verify bitcode can pass `llvm-dis` in tests #88

Open artemdinaburg opened 3 years ago

artemdinaburg commented 3 years ago

Sometimes we generate bitcode that does not pass verifier. As a sanity check, lets ensure that we can always disassemble the bitocode via llvm-dis as a part of our test suite.

surovic commented 3 years ago

I think we don't need to explicitly use llvm-dis for this, the roundtrip tests should be enough, because they call clang. The recent issue we had is more about the fact that our current tests did not trigger it. In hindsight, I should've asked for / added a regression test before merging #89

artemdinaburg commented 3 years ago

I don't mind calling llvm-dis since it would be nice to have the bitcode available for debugging any issues as well (its normally a step i do manually); and it may help narrow down problems between bitcode encoding and triggering other clang failures.