Open aneksteind opened 2 years ago
There is an additional challenge to this: instrumentation points are created before statements are inserted. This means that ... info about line 1 ...
is (at that point), impossible to determine at point-building time (it doesn't exist yet)
I've added test cases that demonstrate the issue in #568. The following PDG node is generated there:
n[0]: &_8 _ => _14 @ bb0[39]: fn test_ref_field_addr; _14 = &raw const ((*((*_8).2: *mut pointers::S)).2: *mut pointers::S);
This is a both a bug (AddrOf
node is incorrect) and does not produce all the events listed above
We'd like to treat the following MIR:
as something roughly equal to:
implying that there
LoadAddr
andLoadValue
events for(*_8).2
and(*p).2
When generating these events, the value of each respective pointer will need to be passed to the instrumentation in order for the corresponding object to be detected. This means that the source needs to be instrumented with assignment statements to locals that can be passed. For example: