| Index: src/msan.h
|
| diff --git a/src/hydrogen-sce.h b/src/msan.h
|
| similarity index 77%
|
| copy from src/hydrogen-sce.h
|
| copy to src/msan.h
|
| index 55e153e0ed5ee3481669ee5c991f81238d51176e..484c9fa39797187597e534ca14ca8e89fd990135 100644
|
| --- a/src/hydrogen-sce.h
|
| +++ b/src/msan.h
|
| @@ -25,24 +25,25 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -#ifndef V8_HYDROGEN_SCE_H_
|
| -#define V8_HYDROGEN_SCE_H_
|
| +// MemorySanitizer support.
|
|
|
| -#include "hydrogen.h"
|
| +#ifndef V8_MSAN_H_
|
| +#define V8_MSAN_H_
|
|
|
| -namespace v8 {
|
| -namespace internal {
|
| +#ifndef __has_feature
|
| +# define __has_feature(x) 0
|
| +#endif
|
|
|
| +#if __has_feature(memory_sanitizer) && !defined(MEMORY_SANITIZER)
|
| +# define MEMORY_SANITIZER
|
| +#endif
|
|
|
| -class HStackCheckEliminationPhase : public HPhase {
|
| - public:
|
| - explicit HStackCheckEliminationPhase(HGraph* graph)
|
| - : HPhase("H_Stack check elimination", graph) { }
|
| +#ifdef MEMORY_SANITIZER
|
| +# include <sanitizer/msan_interface.h>
|
| +// Marks a memory range as fully initialized.
|
| +# define MSAN_MEMORY_IS_INITIALIZED(p, s) __msan_unpoison((p), (s))
|
| +#else
|
| +# define MSAN_MEMORY_IS_INITIALIZED(p, s)
|
| +#endif
|
|
|
| - void Run();
|
| -};
|
| -
|
| -
|
| -} } // namespace v8::internal
|
| -
|
| -#endif // V8_HYDROGEN_SCE_H_
|
| +#endif // V8_MSAN_H_
|
|
|