Skip to content

Commit 60da703

Browse files
author
Ethan Graham
committed
prog/rand: panic when curr call is overwritten
1 parent c1029df commit 60da703

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

prog/rand.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,9 @@ func (r *randGen) generateParticularCall(s *state, meta *Syscall) (calls []*Call
616616
panic(fmt.Sprintf("generating no_generate call: %v", meta.Name))
617617
}
618618
c := MakeCall(meta, nil)
619+
if r.currCall != nil {
620+
panic("overwrote currCall")
621+
}
619622
r.currCall = c
620623
defer func() { r.currCall = nil }()
621624
c.Args, calls = r.generateArgs(s, meta.Args, DirIn)

0 commit comments

Comments
 (0)