Skip to content

Commit

Permalink
fixes taken pathes in the primus promiscuous mode (#971)
Browse files Browse the repository at this point in the history
We had a bug so far when pathes that were taken in
the primus promiscuous mode sometimes were far away
from the real ones.
That was possible because a forked continuation could
return and an execution would continue from a forked
point.

This PR fixes this bug and a forked continuation
never returns.
  • Loading branch information
gitoleg authored and ivg committed Aug 13, 2019
1 parent ff14959 commit c599519
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/primus_promiscuous/primus_promiscuous_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ module Main(Machine : Primus.Machine.S) = struct
Machine.Global.get state >>= fun {forkpoints} ->
if Set.mem forkpoints dst
then Eval.halt >>= never_returns
else Linker.exec (`tid dst)
else
Linker.exec (`tid dst) >>= fun () ->
Eval.halt >>= never_returns
| _ -> Machine.return ()

let fork_on_calls blk jmp = match Jmp.kind jmp with
Expand Down

0 comments on commit c599519

Please sign in to comment.