Skip to content

Commit

Permalink
Add manual review strategy for unsafe code
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Sichert <[email protected]>
  • Loading branch information
pablosichert committed Jan 31, 2022
1 parent 9314f8e commit 7e1b77b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rfcs/2021-12-20-10517-llvm-backend-for-vrl.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,17 @@ fringe edge cases that only occur when specific expressions interact with each
other. We can use the existing execution modes to cross-validate for
correctness.

Manual review: While static analysis tools and automated tests prevent a certain
class of bugs, there's still many logic errors that can occur in `unsafe` code
which can lead to memory corruption when invariants are violated. For one
measure, we can save LLVM IR in textual form in
[`lib/vrl/tests/tests/expressions`](https://github.com/vectordotdev/vector/blob/master/lib/vrl/tests/tests/expressions)
such that manual verification of generated code can be incorporated into the
pull review process. We might also add review guidelines that e.g. require
adding a label `unsafe` to the pull request (ideally this can be automated), and
requests reviewers to explicitly acknowledge that they have reviewed the unsafe
blocks in question.

## Rationale

As long as the single-core performance of VRL is the bottleneck of a topology,
Expand Down

0 comments on commit 7e1b77b

Please sign in to comment.