1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[libFuzzer] do not initialize parts of TracePC -- let them be initialized by the linker. Add no-msan attribute to the memcmp hook.

llvm-svn: 286665
This commit is contained in:
Kostya Serebryany 2016-11-11 23:06:53 +00:00
parent 2499c998f5
commit f659c44cdb
2 changed files with 5 additions and 2 deletions

View File

@ -218,6 +218,9 @@ void TracePC::PrintCoverage() {
// For cmp instructions the interesting value is a XOR of the parameters.
// The interesting value is mixed up with the PC and is then added to the map.
#ifdef __clang__ // avoid gcc warning.
__attribute__((no_sanitize("memory")))
#endif
void TracePC::AddValueForMemcmp(void *caller_pc, const void *s1, const void *s2,
size_t n) {
if (!n) return;

View File

@ -101,8 +101,8 @@ private:
};
Module Modules[4096];
size_t NumModules = 0;
size_t NumGuards = 0;
size_t NumModules; // linker-initialized.
size_t NumGuards; // linker-initialized.
static const size_t kNumCounters = 1 << 14;
alignas(8) uint8_t Counters[kNumCounters];