Skip to content

Commit

Permalink
Add call edges even if cannot determine return edges.
Browse files Browse the repository at this point in the history
  • Loading branch information
gsvgit committed Jan 6, 2024
1 parent 90dc99f commit 590afee
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions VSharp.IL/CFG.fs
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,15 @@ type ApplicationGraph(getNextBasicBlockGlobalId,applicationGraphDelta:Applicatio
if not <| callTo.IncomingCallEdges.Contains callFrom then
let mutable returnTo = callFrom
// if not exists then it should be from exception mechanism
if not callTarget.method.IsStaticConstructor && exists then
if (not callTarget.method.IsStaticConstructor) && exists then
returnTo <- callerMethodCfgInfo.ResolveBasicBlock location.ReturnTo
let exists, callEdges = callFrom.OutgoingEdges.TryGetValue dummyTerminalForCallEdge
if exists then
let added = callEdges.Add callTo
assert added
else
callFrom.OutgoingEdges.Add(dummyTerminalForCallEdge, HashSet [|callTo|])

let exists, callEdges = callFrom.OutgoingEdges.TryGetValue dummyTerminalForCallEdge
if exists then
let added = callEdges.Add callTo
assert added
else
callFrom.OutgoingEdges.Add(dummyTerminalForCallEdge, HashSet [|callTo|])

calledMethodCfgInfo.Sinks
|> ResizeArray.iter (fun returnFrom ->
Expand Down

0 comments on commit 590afee

Please sign in to comment.