Open bennn opened 1 year ago
Here's an idea: we go all the way to logical predicates on stack frames.
Location specifiers:
in-module <module>
True if specified module is topmost on the stack (excepting FloatTracker frames of course)dyn-in-module <module>
True if the specified module is anywhere on the stack (dynamic extent of module)in-file <file>
(Same)dyn-in-file <file>
(Same)in-func <funcname + filename>
(Same)dyn-in-func <funcname + filename>
(Same)Then we can combine them with and
, or
, and not
. Top level might be an implicit and
or or
, depending on if we want the semantics to be inclusive/exclusive by default. (i.e. If we name and use the parameter as inject=
or no_inject=
.)
Sounds impressive, but also hard to implement. We'll need to normalize, check for vacuity, etc.
Let's leave this open until we have 3-5 examples of ways we might want to inject.
Then, use the examples to guide toward a low-work high-reward design.
In https://github.com/utahplt/FloatTrackerExamples/issues/5 , one of the random injections wound up in a function that (I claim) is protected against NaNs.
Even if my claim is wrong, it'd be helpful to ignore that function and let random NaNs appear in other places.
(For now there is a workaround: target specific functions one at a time. That might be better overall.)
The current injector supports only opt-in functions & libraries: