This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug sanitizer/82824] New: [8 regression] libsanitizer fails to build: VM_MEMORY_OS_ALLOC_ONCE undefined


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82824

            Bug ID: 82824
           Summary: [8 regression] libsanitizer fails to build:
                    VM_MEMORY_OS_ALLOC_ONCE undefined
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-apple-darwin11.4.2
            Target: x86_64-apple-darwin11.4.2
             Build: x86_64-apple-darwin11.4.2

Created attachment 42543
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42543&action=edit
proposed patch

Since the import of libsanitizer from upstream r315899, it fails to build on
Mac OS X 10.7/Darwin 11:

/vol/gcc/src/hg/trunk/local/libsanitizer/lsan/lsan_common_mac.cc: In function
'void __lsan::ProcessPlatformSpecificAllocations(__lsan::Frontier*)':
/vol/gcc/src/hg/trunk/local/libsanitizer/lsan/lsan_common_mac.cc:158:26: error:
'VM_MEMORY_OS_ALLOC_ONCE' was not declared in this scope
     if (info.user_tag == VM_MEMORY_OS_ALLOC_ONCE) {
                          ^~~~~~~~~~~~~~~~~~~~~~~
/vol/gcc/src/hg/trunk/local/libsanitizer/lsan/lsan_common_mac.cc:158:26: note:
suggested alternative: 'VM_MEMORY_MALLOC_HUGE'
     if (info.user_tag == VM_MEMORY_OS_ALLOC_ONCE) {
                          ^~~~~~~~~~~~~~~~~~~~~~~
                          VM_MEMORY_MALLOC_HUGE
make[4]: *** [lsan_common_mac.lo] Error 1

I've found that VM_MEMORY_OS_ALLOC_ONCE is defined in <mach/vm_statistics.h>
since Mac OS X 10.9/Darwin 13.  Wrapping the affected section of code as in the
attached patch allows the build to finish.

Given that I've never had any success getting even the most trivial patches
upstream and have no idea which Darwin versions are supported there, I'm
reporting this here.

  Rainer

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