aboutsummaryrefslogtreecommitdiffstats
path: root/prog/prog.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2021-10-01 14:43:02 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2021-10-01 17:45:20 +0200
commitdb0f57870523a9bff1629dad1a340ba8aac79d82 (patch)
tree33b82e919cef96856bf952c78c76190885877fdd /prog/prog.go
parentcc80db955d0551c2456692da6176530dd27e08ed (diff)
pkg/csource: remove calls instead of skipping them
Currently csource skips calls at the very last moment, which has an unpleasant consequence - if we make choice of enabled defines depend on the individual calls or call properties, we may end up with defined yet unused functions. The perfect solution would be to untie syz_emit_ethernet/syz_extract_tcp_res and NetInjection, and also to untie VhciInjection and syz_emit_vhci. For the time being, move these checks to the very beginning of csource processing, so that these calls could be removed before we construct our defines. Adjust pkg/csource/csource_test.go to better cover fault injection generation problems.
Diffstat (limited to 'prog/prog.go')
-rw-r--r--prog/prog.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/prog/prog.go b/prog/prog.go
index 068198ffe..d41117a2f 100644
--- a/prog/prog.go
+++ b/prog/prog.go
@@ -404,7 +404,7 @@ func removeArg(arg0 Arg) {
}
// removeCall removes call idx from p.
-func (p *Prog) removeCall(idx int) {
+func (p *Prog) RemoveCall(idx int) {
c := p.Calls[idx]
for _, arg := range c.Args {
removeArg(arg)