<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 --- - libFuzzer 3.8 fails with "illegal hardware instruction""
   href="https://llvm.org/bugs/show_bug.cgi?id=28890">28890</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>libFuzzer 3.8 fails with "illegal hardware instruction"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.8
          </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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sylvestre@debian.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jack.lloyd@gmail.com, llvm-bugs@lists.llvm.org, vonosmas@gmail.com
          </td>
        </tr>

        <tr>
          <th>Depends on</th>
          <td>25991
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Trying the example with llvm 3.8:
<a href="http://llvm.org/docs/LibFuzzer.html">http://llvm.org/docs/LibFuzzer.html</a>

$ apt-get install libfuzzer-3.8-dev clang-3.8
[..]

$ cat << EOF > test_fuzzer.cc
#include <stdint.h>
#include <stddef.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  if (size > 0 && data[0] == 'H')
    if (size > 1 && data[1] == 'I')
       if (size > 2 && data[2] == '!')
       __builtin_trap();
  return 0;
}
EOF

$ clang++-3.8 -fsanitize=address -fsanitize-coverage=edge test_fuzzer.cc
/usr/lib/llvm-3.8/lib/libFuzzer.a

$ ./a.out
Seed: 2980367726
PreferSmall: 1
#0    READ   units: 1 exec/s: 0
#1    INITED cov: 2 units: 1 exec/s: 0
#2    NEW    cov: 3 units: 2 exec/s: 0 L: 64 MS: 0 
#657    NEW    cov: 4 units: 3 exec/s: 0 L: 64 MS: 0 
#1070    NEW    cov: 5 units: 4 exec/s: 0 L: 1 MS: 4
ShuffleBytes-ChangeByte-EraseByte-CrossOver-
#4893    NEW    cov: 6 units: 5 exec/s: 0 L: 2 MS: 2 CrossOver-ChangeBit-
#5577    NEW    cov: 7 units: 6 exec/s: 0 L: 50 MS: 1 CrossOver-
zsh: illegal hardware instruction  ./a.out

reported here:
<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833563">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833563</a></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>