<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 --- - optimization generates a segfault or bus error"
   href="https://llvm.org/bugs/show_bug.cgi?id=27178">27178</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>optimization generates a segfault or bus error
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>pavel.sakov@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>- Optimized binary with -O1 or -O2 generates a segfault or bus error on two
different installations (opensuse Leap 42.1 and 13.2), but not on opensuse 13.1
- Non-optimized binary runs cleanly
- Linking with -ldmalloc finds no memory issues
- Compiled with gcc, either optimized or not, the binary runs cleanly

Platform:

pavel@sparse{gridutils}uname -a
Linux sparse 4.4.1-2.gddc5d70-default #1 SMP PREEMPT Tue Feb 2 16:31:39 UTC
2016 (ddc5d70) x86_64 x86_64 x86_64 GNU/Linux
pavel@sparse{gridutils}clang --version
clang version 3.7.0 (tags/RELEASE_370/final 246586)
Target: x86_64-suse-linux
Thread model: posix

How to reproduce:

1. svn checkout <a href="https://github.com/sakov/gridutils-c">https://github.com/sakov/gridutils-c</a>
2. cd gridutils-c/trunk/gridutils
3. ./configure
4. make
5. cd test
6. ../getnodes gridpoints_DD-raw.txt -i DD -o DD -v > gridpoints_DD.txt
7. ../getnodes gridpoints_DD.txt -i DD -o CO > gridpoints_CO.txt
8. ../getnodes gridpoints_CO.txt -i CO -o CE > gridpoints_CE.txt
9. ../getnodes gridpoints_CE.txt -i CE -o CO > gridpoints_CO2.txt

gets: Segmentation fault

Cheers,
Pavel Sakov</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>