GaloisInc / macaw

Open source binary analysis tools.
BSD 3-Clause "New" or "Revised" License
190 stars 19 forks source link

Fix refinement panic with parallel CFG edges #381

Closed staslyakhov closed 2 months ago

staslyakhov commented 2 months ago

We encountered a binary that caused a panic due to insertLabeledEdge returning Nothing. It seems like this could happen in one of two cases:

By using replaceLabeledEdge instead, we can avoid panicking in the second case where refinement execution can proceed without issue. However, it would be nice to make sure that the appearance of a parallel edge isn't an indicator of a larger issue in the algorithm, or if using replaceLabeledEdge is a good enough fix.