[llvm-bugs] [Bug 38958] New: use of MAP_ANONYMOUS blocks build on OS X 10.10 and earlier

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Sep 15 09:14:08 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38958

            Bug ID: 38958
           Summary: use of MAP_ANONYMOUS blocks build on OS X 10.10 and
                    earlier
           Product: compiler-rt
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: xray
          Assignee: unassignedbugs at nondot.org
          Reporter: ken.cunningham.webuse at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20884
  --> https://bugs.llvm.org/attachment.cgi?id=20884&action=edit
instances of MAP_ANONYMOUS in compiler-rt/* as of 20180915

A number of uses of MAP_ANONYMOUS have crept into the compiler-rt codebase, and
causes build failures on systems that only define MAP_ANON and not
MAP_ANONYMOUS (including macOS 10.10 and earlier).

Previously <https://reviews.llvm.org/D15180> it was decided to use MAP_ANON
instead for this reason.

This could possibly be fixed in compiler-rt/CMakeLists.txt with a simple
blanket change: 

IF (APPLE)
  add_definitions(-DMAP_ANONYMOUS=MAP_ANON)
ENDIF

Or more elegantly the define could be tested for and added only if missing.

Or the instances of MAP_ANONYMOUS in the compiler-rt codebase could be
individually changed to MAP_ANON.

(I note tsan has done it's own version of managing this mapping with
TSAN_MAP_ANON in compiler-rt/test/tsan/ignore_lib5.cc)

A present list of involved files is attached.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180915/87870e4d/attachment.html>


More information about the llvm-bugs mailing list