<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - SIGABRT on wasm disassemble"
   href="https://bugs.llvm.org/show_bug.cgi?id=36194">36194</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SIGABRT on wasm disassemble
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0
          </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>llvm-objdump
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>accounts-llvm@holbrook.no
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19792" name="attach_19792" title="source and wasm binary">attachment 19792</a> <a href="attachment.cgi?id=19792&action=edit" title="source and wasm binary">[details]</a></span>
source and wasm binary

wasm was generated with:

wat2wasm

then linked with:

lld -flavor wasm

Using release_60 branch with linux 4.14.15-1-ARCH

wast sources and linked wasm attached.

--

Error output:

$ /mnt/data/src/llvm/llvm.org-llvm/build/bin/llvm-objdump a.wasm -d

a.wasm: file format WASM

Disassembly of section CODE:
CODE:
llvm-objdump: /mnt/data/src/llvm/llvm.org-llvm/include/llvm/ADT/ArrayRef.h:180:
llvm::ArrayRef<T> llvm::ArrayRef<T>::slice(size_t, size_t) const [with T =
unsigned char; size_t = long unsigned int]: Assertion `N+M <= size() &&
"Invalid specifier"' failed.
#0 0x000055d521951a2d llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/mnt/data/src/llvm/llvm.org-llvm/lib/Support/Unix/Signals.inc:398:0
#1 0x000055d521951ac0 PrintStackTraceSignalHandler(void*)
/mnt/data/src/llvm/llvm.org-llvm/lib/Support/Unix/Signals.inc:462:0
#2 0x000055d52194fc95 llvm::sys::RunSignalHandlers()
/mnt/data/src/llvm/llvm.org-llvm/lib/Support/Signals.cpp:49:0
#3 0x000055d521951299 SignalHandler(int)
/mnt/data/src/llvm/llvm.org-llvm/lib/Support/Unix/Signals.inc:252:0
#4 0x00007fd72589bdd0 __restore_rt (/usr/lib/libpthread.so.0+0x11dd0)
#5 0x00007fd7243ce860 __GI_raise (/usr/lib/libc.so.6+0x34860)
#6 0x00007fd7243cfec9 __GI_abort (/usr/lib/libc.so.6+0x35ec9)
#7 0x00007fd7243c70bc __assert_fail_base (/usr/lib/libc.so.6+0x2d0bc)
#8 0x00007fd7243c7133 (/usr/lib/libc.so.6+0x2d133)
#9 0x000055d52135affa llvm::ArrayRef<unsigned char>::slice(unsigned long,
unsigned long) const
/mnt/data/src/llvm/llvm.org-llvm/include/llvm/ADT/ArrayRef.h:180:0
#10 0x000055d521348895 DisassembleObject(llvm::object::ObjectFile const*, bool)
/mnt/data/src/llvm/llvm.org-llvm/tools/llvm-objdump/llvm-objdump.cpp:1595:0
#11 0x000055d52134b5eb DumpObject(llvm::object::ObjectFile*,
llvm::object::Archive const*)
/mnt/data/src/llvm/llvm.org-llvm/tools/llvm-objdump/llvm-objdump.cpp:2050:0
#12 0x000055d52134bfe9 DumpInput(llvm::StringRef)
/mnt/data/src/llvm/llvm.org-llvm/tools/llvm-objdump/llvm-objdump.cpp:2140:0
#13 0x000055d5213697b2 void
(*std::for_each<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >*,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > >, void
(*)(llvm::StringRef)>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >*,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > >,
__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >*,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > >, void
(*)(llvm::StringRef)))(llvm::StringRef)
/usr/include/c++/7.2.1/bits/stl_algo.h:3883:0
#14 0x000055d521360266 void
(*llvm::for_each<llvm::cl::list<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >, bool,
llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > > >&, void
(*)(llvm::StringRef)>(llvm::cl::list<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >, bool,
llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > > >&, void (*)(llvm::StringRef)))(llvm::StringRef)
/mnt/data/src/llvm/llvm.org-llvm/include/llvm/ADT/STLExtras.h:808:0
#15 0x000055d52134c6d2 main
/mnt/data/src/llvm/llvm.org-llvm/tools/llvm-objdump/llvm-objdump.cpp:2202:0
#16 0x00007fd7243baf4a __libc_start_main (/usr/lib/libc.so.6+0x20f4a)
#17 0x000055d5213410ba _start
(/mnt/data/src/llvm/llvm.org-llvm/build/bin/llvm-objdump+0x34a0ba)
Stack dump:
0.      Program arguments:
/mnt/data/src/llvm/llvm.org-llvm/build/bin/llvm-objdump a.wasm -d 
Aborted (core dumped)</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>