[lldb-dev] [Bug 31699] New: [Windows] LLDB crashes when launched with a startup script on the command line.

via lldb-dev lldb-dev at lists.llvm.org
Thu Jan 19 14:18:12 PST 2017


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

            Bug ID: 31699
           Summary: [Windows] LLDB crashes when launched with a startup
                    script on the command line.
           Product: lldb
           Version: 4.0
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: vadimcn at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

- Install LLVM for Windows snapshot build from http://llvm.org/build (SVN
r291454, built on 9 January 2017 at the time of filing this).
- Launch LLDB: lldb -O "p 42".
- LLDB crashes.

I've tracked the cause down to snapshot builds being built with a statically
linked CRT (-DLLVM_USE_CRT_RELEASE=MT).  When a startup script is given on the
command line, lldb.exe creates a pipe, writes the script into the write end,
wraps a stdio file around the read end, and gives the resulting FILE* to
SBDebugger::SetInputFileHandle().  Unfortunately, since SBDebugger lives in
liblldb.dll, with its own copy of the CRT, that handle is not valid there. 
Later, it tries to read from that handle, and... boom.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170119/bc79ca6d/attachment.html>


More information about the lldb-dev mailing list