draperlaboratory / VIBES

Verified, Incremental, Binary Editing with Synthesis
MIT License
51 stars 1 forks source link

Test framework does not call Bap_main.init #92

Closed codyroux closed 3 years ago

codyroux commented 3 years ago

It is technically "undefined behavior" to call any BAP function without first having called Bap_main.init to load a number of things, including Lisp semantics and disassemblers.

We either need to publish a run_unit : unit -> unit in the lib and call it in the plugin, or do something akin to here: https://github.com/BinaryAnalysisPlatform/bap/blob/master/lib_test/bap/run_tests.ml

ivg commented 3 years ago

Yes, unless BAP is initialized, no plugins are loaded. I would suggest following the bap way and loading bap in the test runner. Also, do not forget to add findlib.dynload as the build dependency to the test runner.

codyroux commented 3 years ago

Fixed, in e21cf2533fa6108658c9075dcf3b485be68bbb4e