[llvm-bugs] [Bug 25094] New: clang-format crash in WhitespaceManager with 'UseTab: ForIndentation, TabWidth: 0'

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 7 07:08:02 PDT 2015


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

            Bug ID: 25094
           Summary: clang-format crash in WhitespaceManager with 'UseTab:
                    ForIndentation, TabWidth: 0'
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: greg_bedwell at sn.scee.net
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

I found this fuzzing various inputs and command line options to clang-format
so, while I expect that this is an unlikely combination of options to be used
in practice, it shouldn't crash.

In this case 1.cpp just seems to have to not be empty.  I'm using a file
containing only the character 'a'.  My command line is:

$ clang-format.exe  "--style={UseTab: ForIndentation, TabWidth: 0}" 1.cpp

According to the stack dump it's crashing inside
clang::format::WhitespaceManager::appendIndentText()

Tested with r249542.

-- 
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/20151007/326c05db/attachment.html>


More information about the llvm-bugs mailing list