This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libsanitizer] Fix Mac OS X 10.7 bootstrap (PR sanitizer/82824)

Hi Jakub,

>> On Mon, Dec 18, 2017 at 11:21:35AM +0100, Rainer Orth wrote:
>>> I've been using the following in my tree.  Still need to try and get
>>> this upstream.
>> Please.  If that doesn't work, I think we need to do it in configure,
>> sanitizer_internal_defs.h seems to be included very early, so there
>> is no easy header to override say in include/system/ tree.
> done now as  Together with the revised
> version of this has restored Darwin 11
> build and sanitizer testing for me for quite some time.

both patches have now been approved upstream and the second one was
installed already.  Bootstrapped on x86_64-apple-darwin11.4.2.  Is this
ok now for mainline?


Rainer Orth, Center for Biotechnology, Bielefeld University

2018-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR sanitizer/82824
	* lsan/ Cherry-pick upstream r322437.

# HG changeset patch
# Parent  5a47a5ded615a8757277869e03afe2337e6de3d4
Fix Mac OS X 10.7 bootstrap

diff --git a/libsanitizer/lsan/ b/libsanitizer/lsan/
--- a/libsanitizer/lsan/
+++ b/libsanitizer/lsan/
@@ -22,6 +22,13 @@
 #include <mach/mach.h>
+// Only introduced in Mac OS X 10.9.
+static const int kSanitizerVmMemoryOsAllocOnce = VM_MEMORY_OS_ALLOC_ONCE;
+static const int kSanitizerVmMemoryOsAllocOnce = 73;
 namespace __lsan {
 typedef struct {
@@ -155,7 +162,7 @@ void ProcessPlatformSpecificAllocations(
     // libxpc stashes some pointers in the Kernel Alloc Once page,
     // make sure not to report those as leaks.
-    if (info.user_tag == VM_MEMORY_OS_ALLOC_ONCE) {
+    if (info.user_tag == kSanitizerVmMemoryOsAllocOnce) {
       ScanRangeForPointers(address, end_address, frontier, "GLOBAL",

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]