Path: blob/main/contrib/llvm-project/compiler-rt/lib/hwasan/hwasan_poisoning.cpp
35235 views
//===-- hwasan_poisoning.cpp ------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file is a part of HWAddressSanitizer.9//10//===----------------------------------------------------------------------===//1112#include "hwasan_poisoning.h"1314#include "hwasan_mapping.h"15#include "interception/interception.h"16#include "sanitizer_common/sanitizer_common.h"17#include "sanitizer_common/sanitizer_linux.h"1819namespace __hwasan {2021uptr TagMemory(uptr p, uptr size, tag_t tag) {22uptr start = RoundDownTo(p, kShadowAlignment);23uptr end = RoundUpTo(p + size, kShadowAlignment);24return TagMemoryAligned(start, end - start, tag);25}2627} // namespace __hwasan2829// --- Implementation of LSan-specific functions --- {{{130namespace __lsan {31bool WordIsPoisoned(uptr addr) {32// Fixme: implement actual tag checking.33return false;34}35} // namespace __lsan363738