summaryrefslogtreecommitdiff
path: root/deps/v8/src/msan.h
blob: 4130d22a65211166a5ffa3514733dac425f1155c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2013 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// MemorySanitizer support.

#ifndef V8_MSAN_H_
#define V8_MSAN_H_

#include "src/globals.h"

#ifndef __has_feature
# define __has_feature(x) 0
#endif

#if __has_feature(memory_sanitizer) && !defined(MEMORY_SANITIZER)
# define MEMORY_SANITIZER
#endif

#if defined(MEMORY_SANITIZER) && !defined(USE_SIMULATOR)
# include <sanitizer/msan_interface.h>  // NOLINT
// Marks a memory range as fully initialized.
# define MSAN_MEMORY_IS_INITIALIZED_IN_JIT(p, s) __msan_unpoison((p), (s))
#else
# define MSAN_MEMORY_IS_INITIALIZED_IN_JIT(p, s)
#endif

#endif  // V8_MSAN_H_