You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dataflow analysis occurs at the functional level, and it should be extended to work at the package level. As an introductory approach all conditional statements should be considered as valid paths.
Every dump statement within a package should be analysed
Analysis should be preformed on nested function, if they are present in the same package
Analysis should be done into if statements
Analysis should be done into for loops
Analysis should be done into switch statements
#examples
#local functions
#!go
func foo( var ) type {
var2 := global + var
bar(var2)
return var2
}
func bar( var ) {
otherGlobal = var2
return
}
main () {
buf := receive()
in := instrumenter.Unpack(buf)
res := foo( in )
//dump
}
Here dataflow analysis should be preformed on the function foo and bar the variables affected by the receive are otherGlobal, var2,in, and res.
In this scenario the variables should be collected regardless of the path taken at runtime. The resulting dump statement should contain the variables {var,var2,buf}
##for
#!go
buf := receive()
in := instrumenter.Unpack(buf)
for ( conditional ) {
a := goHome(in)
b := goToSleep(a)
c := upAgainEarly(b)
}
//@dump
Here the variables {a,b,c} should all be logged regardless of the value of conditional or if the for loop was ever executed, furthermore analysis should be preformed on the local functions, any resulting variables should be logged as well.
Dataflow analysis occurs at the functional level, and it should be extended to work at the package level. As an introductory approach all conditional statements should be considered as valid paths.
if
statementsfor
loopsswitch
statements#examples
#local functions
Here dataflow analysis should be preformed on the function
foo
andbar
the variables affected by the receive areotherGlobal
,var2
,in
, andres
.##if
In this scenario the variables should be collected regardless of the path taken at runtime. The resulting dump statement should contain the variables {
var
,var2
,buf
}##for
Here the variables {
a
,b
,c
} should all be logged regardless of the value ofconditional
or if the for loop was ever executed, furthermore analysis should be preformed on the local functions, any resulting variables should be logged as well.##switch
Here variables affected by executing any of the local functions should be logged
[Issue created by wantonsolutions: 2015-08-21]
The text was updated successfully, but these errors were encountered: