[llvm-bugs] [Bug 25466] New: ASan should relocate its shadow region if the default location is claimed by something else

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 9 14:35:00 PST 2015


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

            Bug ID: 25466
           Summary: ASan should relocate its shadow region if the default
                    location is claimed by something else
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: jeremyhu at apple.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

As initially reported to me at
https://bugs.freedesktop.org/show_bug.cgi?id=92876

"""
$ /opt/wine/bin/wine /opt/wine/lib/wine/fakedlls/winemine.exe 
==16321==Shadow memory range interleaves with an existing memory mapping. ASan
cannot proceed correctly. ABORTING.
==16321==ASan shadow was supposed to be located in the [0x1ffff000-0x3fffffff]
range.
==16321==Process memory map follows:
    0x43c0d000-0x43c9f000   
/opt/X11/lib/asan/libclang_rt.asan_osx_dynamic.dylib
    0x43c9f000-0x44139000   
/opt/X11/lib/asan/libclang_rt.asan_osx_dynamic.dylib
    0x44139000-0x4417e000   
/opt/X11/lib/asan/libclang_rt.asan_osx_dynamic.dylib
    0x4384d000-0x43bb4000    /opt/X11/lib/libfreetype.6.dylib
    0x43bb4000-0x43bc3000    /opt/X11/lib/libfreetype.6.dylib
    0x43bc3000-0x43c0d000    /opt/X11/lib/libfreetype.6.dylib
    0x43720000-0x437dd000    /opt/wine-1.3.16/lib/wine/comctl32.dll.so
    0x437dd000-0x43808000    /opt/wine-1.3.16/lib/wine/comctl32.dll.so
    0x43808000-0x4384d000    /opt/wine-1.3.16/lib/wine/comctl32.dll.so
    0x434f7000-0x4359d000    /opt/wine-1.3.16/lib/wine/shell32.dll.so
    0x4359d000-0x436b6000    /opt/wine-1.3.16/lib/wine/shell32.dll.so
    0x436b6000-0x43720000    /opt/wine-1.3.16/lib/wine/shell32.dll.so
    0x43169000-0x431ba000    /opt/wine-1.3.16/lib/wine/shlwapi.dll.so
    0x431ba000-0x431c3000    /opt/wine-1.3.16/lib/wine/shlwapi.dll.so
    0x431c3000-0x431fe000    /opt/wine-1.3.16/lib/wine/shlwapi.dll.so
    0x433a5000-0x4347b000    /opt/wine-1.3.16/lib/wine/oleaut32.dll.so
    0x4347b000-0x43488000    /opt/wine-1.3.16/lib/wine/oleaut32.dll.so
    0x43488000-0x434f7000    /opt/wine-1.3.16/lib/wine/oleaut32.dll.so
    0x43300000-0x43364000    /opt/wine-1.3.16/lib/wine/rpcrt4.dll.so
    0x43364000-0x4336b000    /opt/wine-1.3.16/lib/wine/rpcrt4.dll.so
    0x4336b000-0x433a5000    /opt/wine-1.3.16/lib/wine/rpcrt4.dll.so
    0x41aa9000-0x41ac0000    /opt/wine-1.3.16/lib/wine/version.dll.so
    0x41ac0000-0x41ac1000    /opt/wine-1.3.16/lib/wine/version.dll.so
    0x41ac1000-0x41ac4000    /opt/wine-1.3.16/lib/wine/version.dll.so
[... the process memory map is too long for bugzilla, so I cut it here ...]
==16320==End of process memory map.
fixme:ntdll:RtlNtStatusToDosErrorNoTeb no mapping for 80000101

The full error message (with full process map) can be found here:
https://www.dropbox.com/s/ynhmvn8qx03n73j/wine-xquartz.txt?dl=0
"""

The issue seems to be that wine's WINE_DOS segment conflicts with ASan's
shadow:

    0x00000000-0x40000000    /opt/wine/bin/wine.bin

Load command 3
      cmd LC_SEGMENT
  cmdsize 124
  segname WINE_DOS
   vmaddr 0x00001000
   vmsize 0x40000000
  fileoff 0
 filesize 0
  maxprot 0x00000007
 initprot 0x00000003
   nsects 1
    flags 0x0
Section
  sectname WINE_DOS
   segname WINE_DOS
      addr 0x00001000
      size 0x40000000
    offset 0
     align 2^0 (1)
    reloff 0
    nreloc 0
     flags 0x00000001
 reserved1 0
 reserved2 0

-- 
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/20151109/001a8afe/attachment.html>


More information about the llvm-bugs mailing list