[llvm-bugs] [Bug 41984] New: LLVM ERROR: IO failure on output stream: Bad file descriptor

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 22 11:52:22 PDT 2019


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

            Bug ID: 41984
           Summary: LLVM ERROR: IO failure on output stream: Bad file
                    descriptor
           Product: tools
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: llvm-dsymutil
          Assignee: unassignedbugs at nondot.org
          Reporter: tommaso.piazza at gmail.com
                CC: aprantl at apple.com, friss at apple.com,
                    jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

Running dsymutil on a FAT macho binary with > 4 architectures causes IO
failure. 

Architectures in questions are: x84_64, i386, arm_v7, arm_v7s, arm64

Everything works fine if -num-threads=1 or if architectures <= 4 

I have verified this with dsymutil shipped with Xcode 10.2.x toolchain on
Mojave 10.4.4 and with dsymutil built from source (github).

I couldn't attach the binary to this ticket so I have uploaded it here:
https://mega.nz/#!39dFyCbD!2EVXvCmySdzFdMfxUhRu0TIRxGEI6n4UvssGWGOuCdE

I have tried to debug the issue. I am by no means knowledgeable in C++ or llvm
but I have noticed that changing the value to 5 here
https://github.com/llvm/llvm-project/blob/master/llvm/tools/dsymutil/dsymutil.cpp#L539
solves the issue. I am guessing this doesn't scale though.

Also, the 'help' text for -num-treads is wrong. It's a binary flag in the
source code. The actual number of threads is always either 1 or max supported
by hardware and never the amount specified on the CLI.
https://github.com/llvm/llvm-project/blob/master/llvm/tools/dsymutil/dsymutil.cpp#L369
there should be an else here with Options.Threads = NumThreads

See also: https://github.com/Carthage/Carthage/issues/2738

-- 
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/20190522/19b1c0be/attachment.html>


More information about the llvm-bugs mailing list