You've already forked linux-packaging-mono
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
cmake
docs
include
lib
BlocksRuntime
asan
builtins
cfi
dfsan
esan
fuzzer
afl
scripts
standalone
tests
CMakeLists.txt
FuzzerClangCounters.cpp
FuzzerCommand.h
FuzzerCorpus.h
FuzzerCrossOver.cpp
FuzzerDefs.h
FuzzerDictionary.h
FuzzerDriver.cpp
FuzzerExtFunctions.def
FuzzerExtFunctions.h
FuzzerExtFunctionsDlsym.cpp
FuzzerExtFunctionsDlsymWin.cpp
FuzzerExtFunctionsWeak.cpp
FuzzerExtFunctionsWeakAlias.cpp
FuzzerExtraCounters.cpp
FuzzerFlags.def
FuzzerIO.cpp
FuzzerIO.h
FuzzerIOPosix.cpp
FuzzerIOWindows.cpp
FuzzerInterface.h
FuzzerInternal.h
FuzzerLoop.cpp
FuzzerMain.cpp
FuzzerMerge.cpp
FuzzerMerge.h
FuzzerMutate.cpp
FuzzerMutate.h
FuzzerOptions.h
FuzzerRandom.h
FuzzerSHA1.cpp
FuzzerSHA1.h
FuzzerShmem.h
FuzzerShmemFuchsia.cpp
FuzzerShmemPosix.cpp
FuzzerShmemWindows.cpp
FuzzerTracePC.cpp
FuzzerTracePC.h
FuzzerUtil.cpp
FuzzerUtil.h
FuzzerUtilDarwin.cpp
FuzzerUtilFuchsia.cpp
FuzzerUtilLinux.cpp
FuzzerUtilPosix.cpp
FuzzerUtilWindows.cpp
FuzzerValueBitMap.h
README.txt
build.sh
hwasan
interception
lsan
msan
profile
safestack
sanitizer_common
scudo
stats
tsan
ubsan
ubsan_minimal
xray
CMakeLists.txt
test
unittests
www
.arcconfig
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
libcxx
libcxxabi
libunwind
lld
lldb
llvm
openmp
polly
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mk
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
42 lines
1.4 KiB
C++
42 lines
1.4 KiB
C++
//===- FuzzerExtraCounters.cpp - Extra coverage counters ------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
// Extra coverage counters defined by user code.
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "FuzzerDefs.h"
|
|
|
|
#if LIBFUZZER_LINUX || LIBFUZZER_NETBSD
|
|
__attribute__((weak)) extern uint8_t __start___libfuzzer_extra_counters;
|
|
__attribute__((weak)) extern uint8_t __stop___libfuzzer_extra_counters;
|
|
|
|
namespace fuzzer {
|
|
uint8_t *ExtraCountersBegin() { return &__start___libfuzzer_extra_counters; }
|
|
uint8_t *ExtraCountersEnd() { return &__stop___libfuzzer_extra_counters; }
|
|
ATTRIBUTE_NO_SANITIZE_ALL
|
|
void ClearExtraCounters() { // hand-written memset, don't asan-ify.
|
|
uintptr_t *Beg = reinterpret_cast<uintptr_t*>(ExtraCountersBegin());
|
|
uintptr_t *End = reinterpret_cast<uintptr_t*>(ExtraCountersEnd());
|
|
for (; Beg < End; Beg++) {
|
|
*Beg = 0;
|
|
__asm__ __volatile__("" : : : "memory");
|
|
}
|
|
}
|
|
|
|
} // namespace fuzzer
|
|
|
|
#else
|
|
// TODO: implement for other platforms.
|
|
namespace fuzzer {
|
|
uint8_t *ExtraCountersBegin() { return nullptr; }
|
|
uint8_t *ExtraCountersEnd() { return nullptr; }
|
|
void ClearExtraCounters() {}
|
|
} // namespace fuzzer
|
|
|
|
#endif
|