<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 --- - crash with -fsanitize=undefined during Firefox build"
   href="http://llvm.org/bugs/show_bug.cgi?id=17402">17402</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>crash with -fsanitize=undefined during Firefox build
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>octoploid@yandex.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>During a build of Firefox with -fsanitize=undefined I get:

clang++ -o nsEscape.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers
-include /home/markus/mozilla-central/config/gcc_hidden.h -DMOZ_GLUE_IN_PROGRAM
-DMOZILLA_INTE
RNAL_API -DIMPL_LIBXUL  -DSTATIC_EXPORTABLE_JS_API -DNO_NSPR_10_SUPPORT
-DOS_POSIX=1 -DOS_LINUX=1  -I/home/markus/mozilla-central/ipc/chromium/src
-I/home/markus/mozilla-cent
ral/ipc/glue -I../../ipc/ipdl/_ipdlheaders  -I..
-I/home/markus/mozilla-central/xpcom/io -I. -I../../dist/include 
-I/var/tmp/moz-build-dir/dist/include/nspr -I/var/tmp/moz-b
uild-dir/dist/include/nss      -fPIC  -Qunused-arguments  -DMOZILLA_CLIENT
-include ../../mozilla-config.h -MD -MP -MF .deps/nsEscape.o.pp
-Qunused-arguments  -Qunused-argume
nts -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type
-Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof
-Wno-c++0x-extensions -Wno-extended-offseto
f -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags
-fsanitize=undefined -fno-sanitize=vptr -march=native -fno-exceptions
-fno-strict-aliasing -fno-
rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe  -DNDEBUG
-DTRIMMED -O3 -fomit-frame-pointer 
/home/markus/mozilla-central/xpcom/io/nsEscape.cpp
nsIOUtil.o
clang-3.4: error: unable to execute command: Segmentation fault
clang-3.4: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
5c805e92a5f70a913bc3bfcd15c44875974c2111) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
3f4f420ab7acb10221ba971543a7eed5489fb626)
Target: x86_64-unknown-linux-gnu
Thread model: posix


Reduced:

markus@x4 io % cat test.ii
typedef enum {
  url_XPAlphas = 1
} nsEscapeMask;
int a;
int *b;
char d[] = "";
int *fn1(nsEscapeMask p1) {
  int *e = 0;
  if (p1 == 0)
    for (;; a++) {
      int c = *e++;
      if (p1)
        *b++ = 0;
      *b++ = d[c];
    }
  return 0;
}

markus@x4 io % clang++ -Wall -Wextra -c -fsanitize=undefined -std=gnu++0x -O3
test.ii
clang-3.4: error: unable to execute command: Segmentation fault
clang-3.4: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
5c805e92a5f70a913bc3bfcd15c44875974c2111) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
3f4f420ab7acb10221ba971543a7eed5489fb626)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.4: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.4: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.</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>