Move sanitizer instrumentation to a separate header file. Fixes #2049.
PiperOrigin-RevId: 672986547 Change-Id: I42522f4925237a73168e965364a2dd65c0f067cb
This commit is contained in:
committed by
Copybara-Service
parent
8fa7fe7f5b
commit
e4d4153352
@@ -15,17 +15,6 @@
|
||||
#ifndef MUJOCO_MJMACRO_H_
|
||||
#define MUJOCO_MJMACRO_H_
|
||||
|
||||
// include asan interface header, or provide stubs for poison/unpoison macros when not using asan
|
||||
#ifdef ADDRESS_SANITIZER
|
||||
#include <sanitizer/asan_interface.h>
|
||||
#elif defined(_MSC_VER)
|
||||
#define ASAN_POISON_MEMORY_REGION(addr, size)
|
||||
#define ASAN_UNPOISON_MEMORY_REGION(addr, size)
|
||||
#else
|
||||
#define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
|
||||
#define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
|
||||
#endif
|
||||
|
||||
// max and min (use only for primitive types)
|
||||
#define mjMAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#define mjMIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
Reference in New Issue
Block a user