Reports an error only when non-static data reaches a call to regexp.MustCompile.
This PR also changes the behavior of backtrace in general to report an error when any trace is detected. must-be-static is a constraint on which traces are reported; only the non-static ones.
Using the tool without the must-be-static means all traces are reported, and almost guarantees that an error will be shown. This should not be a problem since backtrace without the must-be-static option should only be used as an exploration tool right now.
This PR add the
must-be-static
option in the slicing specs of the backtrace tool. For example:Reports an error only when non-static data reaches a call to
regexp.MustCompile
.This PR also changes the behavior of backtrace in general to report an error when any trace is detected.
must-be-static
is a constraint on which traces are reported; only the non-static ones.Using the tool without the
must-be-static
means all traces are reported, and almost guarantees that an error will be shown. This should not be a problem since backtrace without the must-be-static option should only be used as an exploration tool right now.