dfsan_chained_origin_depot.cpp 939 B

12345678910111213141516171819202122232425262728
  1. //===-- dfsan_chained_origin_depot.cpp ------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file is a part of DataFlowSanitizer.
  10. //
  11. // A storage for chained origins.
  12. //===----------------------------------------------------------------------===//
  13. #include "dfsan_chained_origin_depot.h"
  14. namespace __dfsan {
  15. static ChainedOriginDepot chainedOriginDepot;
  16. ChainedOriginDepot* GetChainedOriginDepot() { return &chainedOriginDepot; }
  17. void ChainedOriginDepotLockBeforeFork() { chainedOriginDepot.LockBeforeFork(); }
  18. void ChainedOriginDepotUnlockAfterFork(bool fork_child) {
  19. chainedOriginDepot.UnlockAfterFork(fork_child);
  20. }
  21. } // namespace __dfsan