[llvm-bugs] [Bug 37717] New: Writing a .o to /dev/null gets a fatal error

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 6 14:29:41 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37717

            Bug ID: 37717
           Summary: Writing a .o to /dev/null gets a fatal error
           Product: libraries
           Version: trunk
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedbugs at nondot.org
          Reporter: dan433584 at gmail.com
                CC: llvm-bugs at lists.llvm.org

Clang trunk with cmake -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly and
then building anything with -target wasm32--wasm:

    $  echo 'int main() { return 0; }' | ./bin/clang -target wasm32--wasm -c -o
/dev/null -x c -
    fatal error: error in backend: section size does not fit in a uint32_t
    clang-7.0: error: clang frontend command failed with exit code 70 (use -v
to see invocation)
    clang version 7.0.0 (trunk 333614)

The problem is that lib/MC/WasmObjectWriter.cpp is asking the output stream for
the current position, so that it can compute section sizes, but this doesn't
return useful values when the file is /dev/null.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180606/ceb7ad71/attachment.html>


More information about the llvm-bugs mailing list