<html>
    <head>
      <base href="https://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 --- - check-safestack failure when System Integrity Protection enabled on El Capitan"
   href="https://llvm.org/bugs/show_bug.cgi?id=26610">26610</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>check-safestack failure when System Integrity Protection enabled on El Capitan
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>howarth.mailing.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>On x86_64-apple-darwin15 with the default System Integrity Protection enabled,
the check-safestack tests in compiler-rt produce one unexpected regression...

Failing Tests (1):
    SafeStack :: lto.c

  Expected Passes    : 5
  Expected Failures  : 1
  Unexpected Failures: 1

of the form...

FAIL: SafeStack :: lto.c (1 of 7)
******************** TEST 'SafeStack :: lto.c' FAILED ********************
Script:
--
gtimeout 1m  env
DYLD_LIBRARY_PATH=/sw/src/fink.build/llvm39-3.9.0-1/build/stage3/./lib
/sw/src/fink.build/llvm39-3.9.0-1/build/stage3/./bin/clang -flto
-fsanitize=safe-stack
/sw/src/fink.build/llvm39-3.9.0-1/compiler-rt-3.9.0.src/test/safestack/lto.c -o
/sw/src/fink.build/llvm39-3.9.0-1/build/stage3/projects/compiler-rt/test/safestack/Output/lto.c.tmp
gtimeout 1m  
/sw/src/fink.build/llvm39-3.9.0-1/build/stage3/projects/compiler-rt/test/safestack/Output/lto.c.tmp
--
Exit Code: 1

Command Output (stderr):
--
/sw/src/fink.build/llvm39-3.9.0-1/compiler-rt-3.9.0.src/test/safestack/lto.c:10:3:
warning: implicit declaration of function 'puts' is invalid in C99
[-Wimplicit-function-declaration]
  puts(c);
  ^
1 warning generated.
ld: could not process llvm bitcode object file, because
/sw/src/fink.build/llvm39-3.9.0-1/build/stage3/./lib/libLTO.dylib could not be
loaded file '/var/folders/t6/cbdr5_h90fdcnzxp1wlrkppw0000kr/T/lto-7f0c42.o' for
architecture x86_64
clang-3.9: error: linker command failed with exit code 1 (use -v to see
invocation)

--

********************

This failure only occur for the -DBUILD_SHARED_LIBS:BOOL=ON and
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON builds but not for the stock static build. The
main difference here is that for the -DBUILD_SHARED_LIBS:BOOL=ON, libLTO.dylib
shows the linkage...

$ otool -L libLTO.dylib
libLTO.dylib:
    @rpath/libLTO.dylib (compatibility version 1.0.0, current version 3.9.0)
    @rpath/libLLVMX86CodeGen.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMX86AsmPrinter.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMX86AsmParser.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMX86Desc.dylib (compatibility version 0.0.0, current version
0.0.0)
    @rpath/libLLVMX86Info.dylib (compatibility version 0.0.0, current version
0.0.0)
    @rpath/libLLVMX86Disassembler.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMPowerPCCodeGen.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMPowerPCAsmPrinter.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMPowerPCAsmParser.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMPowerPCDesc.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMPowerPCInfo.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMPowerPCDisassembler.dylib (compatibility version 0.0.0,
current version 0.0.0)
    @rpath/libLLVMARMCodeGen.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMARMAsmPrinter.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMARMAsmParser.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMARMDesc.dylib (compatibility version 0.0.0, current version
0.0.0)
    @rpath/libLLVMARMInfo.dylib (compatibility version 0.0.0, current version
0.0.0)
    @rpath/libLLVMARMDisassembler.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMCore.dylib (compatibility version 0.0.0, current version
0.0.0)
    @rpath/libLLVMLTO.dylib (compatibility version 0.0.0, current version
0.0.0)
    @rpath/libLLVMMC.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/libLLVMMCDisassembler.dylib (compatibility version 0.0.0, current
version 0.0.0)
    @rpath/libLLVMSupport.dylib (compatibility version 0.0.0, current version
0.0.0)
    @rpath/libLLVMTarget.dylib (compatibility version 0.0.0, current version
0.0.0)
    @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1226.10.1)

and for the -DLLVM_LINK_LLVM_DYLIB:BOOL=ON build...

$ otool -L libLTO.dylib
libLTO.dylib:
    @rpath/libLTO.dylib (compatibility version 1.0.0, current version 3.9.0)
    @rpath/libLLVM.dylib (compatibility version 1.0.0, current version 3.9.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
120.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1226.10.1)

compared to the static build...

$ otool -L libLTO.dylib
libLTO.dylib:
    @rpath/libLTO.dylib (compatibility version 1.0.0, current version 3.9.0)
    /sw/lib/ncurses/libncurses.5.dylib (compatibility version 5.0.0, current
version 5.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1226.10.1)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)

I assume that the underlying error here is the inability of this test to load
the component or unified LLVM shared libraries required by the loaded
libLTO.dylib in the first two cases.</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>