Skip to content

Commit

Permalink
fixes the IR theory implementation (BinaryAnalysisPlatform#1377)
Browse files Browse the repository at this point in the history
The seq function was incorrectly dropping blocks because the is_empty
predicate was not updated in BinaryAnalysisPlatform#1326 when subinstructions were
introduced and the null label started to be used everywhere.
  • Loading branch information
ivg authored Dec 2, 2021
1 parent bb0d8d3 commit 3b08a65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/bil/bil_ir.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ type t = cfg

let null = KB.Object.null Theory.Program.cls
let is_null x = KB.Object.is_null x
let is_empty {entry} = is_null entry
let is_empty = function
| {entry; blks=[]} -> is_null entry
| _ -> false

module BIR = struct
type t = blk term list
Expand Down

0 comments on commit 3b08a65

Please sign in to comment.