fix_add_check_for_sandbox_then_result.patch 921 B

123456789101112131415161718192021
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Samuel Attard <[email protected]>
  3. Date: Wed, 3 Mar 2021 15:52:46 -0800
  4. Subject: fix: add CHECK for sandbox then_result
  5. It fixes things, we do not know why, we should look at reverting this
  6. patch and doing further investigation in the future. This patch cannot
  7. be upstreamed.
  8. diff --git a/sandbox/linux/bpf_dsl/bpf_dsl.cc b/sandbox/linux/bpf_dsl/bpf_dsl.cc
  9. index b016a525f274c229f5f1365c6a7e462c8cff0242..31e1b9cd107d659ca79949f970bf0e077bdad340 100644
  10. --- a/sandbox/linux/bpf_dsl/bpf_dsl.cc
  11. +++ b/sandbox/linux/bpf_dsl/bpf_dsl.cc
  12. @@ -314,6 +314,7 @@ Elser::Elser(const Elser& elser) = default;
  13. Elser::~Elser() = default;
  14. Elser Elser::ElseIf(BoolExpr cond, ResultExpr then_result) const {
  15. + CHECK(then_result);
  16. return Elser(Cons(std::make_pair(std::move(cond), std::move(then_result)),
  17. clause_list_));
  18. }