Loading...
src/sanitizer_malloc.h libmalloc-792.60.6 libmalloc-474.0.13
--- libmalloc/libmalloc-792.60.6/src/sanitizer_malloc.h
+++ libmalloc/libmalloc-474.0.13/src/sanitizer_malloc.h
@@ -28,9 +28,6 @@
 #include "malloc/malloc.h"
 #include <stdbool.h>
 
-#include <malloc/_ptrcheck.h>
-__ptrcheck_abi_assume_single()
-
 MALLOC_NOEXPORT
 bool
 sanitizer_should_enable(void);
@@ -47,14 +44,14 @@
 _malloc_read_uint16_via_rsp(const void *ptr)
 {
 #if TARGET_CPU_X86_64
-	__asm__ (
-		"subq  %%rsp,       %0  \n"
-		"movw (%%rsp, %0),  %w0 \n"
-		: "+r" (ptr)            // outputs, ptr = %0 read-write
-		:                       // inputs, empty
-		:                       // clobbers, empty
-	);
-	return (uint16_t)(uintptr_t)ptr;
+    __asm__ (
+        "subq  %%rsp,       %0  \n"
+        "movw (%%rsp, %0),  %w0 \n"
+        : "+r" (ptr)            // outputs, ptr = %0 read-write
+        :                       // inputs, empty
+        :                       // clobbers, empty
+    );
+    return (uint16_t)(uintptr_t)ptr;
 #elif TARGET_CPU_ARM64 && TARGET_RT_64_BIT
 	__asm__ (
 		"sub  %0, %0, fp    \n"
@@ -65,7 +62,7 @@
 	);
 	return (uint16_t)(uintptr_t)ptr;
 #else
-	return *(uint16_t *)ptr;
+    return *(uint16_t *)ptr;
 #endif
 }
 
@@ -73,14 +70,14 @@
 _malloc_read_uint64_via_rsp(const void *ptr)
 {
 #if TARGET_CPU_X86_64
-	__asm__ (
-		"subq  %%rsp,       %0  \n"
-		"movq (%%rsp, %0),  %0  \n"
-		: "+r" (ptr)            // outputs, ptr = %0 read-write
-		:                       // inputs, empty
-		:                       // clobbers, empty
-	);
-	return (uint64_t)ptr;
+    __asm__ (
+        "subq  %%rsp,       %0  \n"
+        "movq (%%rsp, %0),  %0  \n"
+        : "+r" (ptr)            // outputs, ptr = %0 read-write
+        :                       // inputs, empty
+        :                       // clobbers, empty
+    );
+    return (uint64_t)ptr;
 #elif TARGET_CPU_ARM64 && TARGET_RT_64_BIT
 	__asm__ (
 		"sub %0, %0, fp  \n"
@@ -91,7 +88,7 @@
 	);
 	return (uint64_t)ptr;
 #else
-	return *(uint64_t *)ptr;
+    return *(uint64_t *)ptr;
 #endif
 }
 
@@ -99,13 +96,13 @@
 _malloc_write_uint64_via_rsp(void *ptr, uint64_t value)
 {
 #if TARGET_CPU_X86_64
-	__asm__ (
-		"subq  %%rsp,  %0         \n"
-		"movq  %1,    (%%rsp, %0) \n"
-		:                         // outputs, empty
-		: "r" (ptr), "r" (value)  // inputs, ptr = %0, value = %1
-		:                         // clobbers, empty
-	);
+    __asm__ (
+        "subq  %%rsp,  %0         \n"
+        "movq  %1,    (%%rsp, %0) \n"
+        :                         // outputs, empty
+        : "r" (ptr), "r" (value)  // inputs, ptr = %0, value = %1
+        :                         // clobbers, empty
+    );
 #elif TARGET_CPU_ARM64 && TARGET_RT_64_BIT
 	__asm__ volatile (
 		"sub %0, %0, fp   \n"
@@ -115,7 +112,7 @@
 		:                         // clobbers, empty
 	);
 #else
-	*(uint64_t *)ptr = value;
+    *(uint64_t *)ptr = value;
 #endif
 }