Repository navigation
Commit e121a13
Go: Fix read-only dereference backflow test
Previously, `calleeReadsOnly` assigned `p = &inner{val: source()}`, which
stored taint inside `[PointerContent, FieldContent(val)]` rather than
tainting `p` with an empty access path. Before removing `PostUpdateNode`s
on read-only pointer dereferences, `_ = p.val` generated `p [postupdate]`
and spurious backflow to the caller happened via `referenceStep`
(`implicit-deref p -> p [postupdate]`), an additional taint step that
only fires when `implicit-deref p` has an empty access path. As a result,
`testNoBackflowFromReadOnlyDeref` passed even without the fix.
Assign `p = taint()` from a pointer-returning source instead so `p` itself
is tainted and the test fails without the fix.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c52d8c6 commit e121a13
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | | - | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
0 commit comments