<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - asan/TestCases/Linux/stack-trace-dlclose.cc failed on Linux/x86"
   href="http://llvm.org/bugs/show_bug.cgi?id=22681">22681</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>asan/TestCases/Linux/stack-trace-dlclose.cc failed on Linux/x86
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hjl.tools@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>On Linux/x86, I got

[hjl@gnu-29 debug]$
/export/build/gnu/llvm-clang-x86-bootstrap-cmake/debug/build-i686-linux/./bin/clang
--driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer
-fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m32
-DSHARED
/export/gnu/import/git/llvm-x32/projects/compiler-rt/test/asan/TestCases/Linux/stack-trace-dlclose.cc
-shared -o
/export/build/gnu/llvm-clang-x86-bootstrap-cmake/debug/build-i686-linux/projects/compiler-rt/test/asan/I386LinuxConfig/TestCases/Linux/Output/stack_trace_dlclose.so
-fPIC
[hjl@gnu-29 debug]$
/export/build/gnu/llvm-clang-x86-bootstrap-cmake/debug/build-i686-linux/./bin/clang
--driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer
-fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m32
-DSO_DIR=\"/export/build/gnu/llvm-clang-x86-bootstrap-cmake/debug/build-i686-linux/projects/compiler-rt/test/asan/I386LinuxConfig/TestCases/Linux/Output\"
/export/gnu/import/git/llvm-x32/projects/compiler-rt/test/asan/TestCases/Linux/stack-trace-dlclose.cc
-ldl -o
/export/build/gnu/llvm-clang-x86-bootstrap-cmake/debug/build-i686-linux/projects/compiler-rt/test/asan/I386LinuxConfig/TestCases/Linux/Output/stack-trace-dlclose.cc.tmp
[hjl@gnu-29 debug]$ ASAN_OPTIONS=exitcode=0 
/export/build/gnu/llvm-clang-x86-bootstrap-cmake/debug/build-i686-linux/projects/compiler-rt/test/asan/I386LinuxConfig/TestCases/Linux/Output/stack-trace-dlclose.cc.tmp
2>&1 | FileCheck
/export/gnu/import/git/llvm-x32/projects/compiler-rt/test/asan/TestCases/Linux/stack-trace-dlclose.cc
/export/gnu/import/git/llvm-x32/projects/compiler-rt/test/asan/TestCases/Linux/stack-trace-dlclose.cc:43:11:
error: expected string not found in input
// CHECK: {{ #0 0x.* in malloc}}
          ^
<stdin>:1:1: note: scanning from here
=================================================================
^
<stdin>:3:91: note: possible intended match here
 #0 0x80f72d4 in __interceptor_free
/export/gnu/import/git/llvm-x32/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:30
                                                                               
          ^
[hjl@gnu-29 build-i686-linux]$ ASAN_OPTIONS=exitcode=0 
/export/build/gnu/llvm-clang-x86-bootstrap-cmake/debug/build-i686-linux/projects/compiler-rt/test/asan/I386LinuxConfig/TestCases/Linux/Output/stack-trace-dlclose.cc.tmp
2>&1 
=================================================================
==17397==ERROR: AddressSanitizer: attempting double-free on 0xb5c007f0 in
thread T0:
    #0 0x80f72d4 in __interceptor_free
/export/gnu/import/git/llvm-x32/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:30
    #1 0x811cceb in main
/export/gnu/import/git/llvm-x32/projects/compiler-rt/test/asan/TestCases/Linux/stack-trace-dlclose.cc:37:3
    #2 0x4f78fe5d in __libc_start_main (/lib/libc.so.6+0x4f78fe5d)
    #3 0x805c4e7 in _start
(/export/build/gnu/llvm-clang-x86-bootstrap-cmake/debug/build-i686-linux/projects/compiler-rt/test/asan/I386LinuxConfig/TestCases/Linux/Output/stack-trace-dlclose.cc.tmp+0x805c4e7)

0xb5c007f0 is located 0 bytes inside of 1-byte region [0xb5c007f0,0xb5c007f1)
freed by thread T0 here:
    #0 0x80f72d4 in __interceptor_free
/export/gnu/import/git/llvm-x32/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:30
    #1 0x811cc94 in main
/export/gnu/import/git/llvm-x32/projects/compiler-rt/test/asan/TestCases/Linux/stack-trace-dlclose.cc:36:3
    #2 0x4f78fe5d in __libc_start_main (/lib/libc.so.6+0x4f78fe5d)

previously allocated by thread T0 here:
    #0 0x80f75d4 in __interceptor_malloc
/export/gnu/import/git/llvm-x32/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
    #1 0xb770b698  (<unknown module>)
    #2 0x811cb47 in main
/export/gnu/import/git/llvm-x32/projects/compiler-rt/test/asan/TestCases/Linux/stack-trace-dlclose.cc:32:13
    #3 0x4f78fe5d in __libc_start_main (/lib/libc.so.6+0x4f78fe5d)

SUMMARY: AddressSanitizer: double-free
/export/gnu/import/git/llvm-x32/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:30
__interceptor_free
==17397==ABORTING
[hjl@gnu-29 build-i686-linux]$ 

The difference is

    #0 0x80f75d4 in __interceptor_malloc
/export/gnu/import/git/llvm-x32/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40

when compiled on Linux/x86 vs

    #0 0x810e9c4 in malloc
/export/gnu/import/git/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40

when compiled on Linux/x86-64 with -m32.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>