<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57311>57311</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Crash of clang-format
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          knepley
      </td>
    </tr>
</table>

<pre>
    This command filed when I tried to reformat part of my repository:

130main *$:/PETSc3/petsc/petsc-dev$ make clangformat
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: clang-format -i include/petsc.h include/petsc/mpiuni/mpi.h include/petsc/private/bagimpl.h include/petsc/private/characteristicimpl.h include/petsc/private/cpputil.hpp include/petsc/private/cudavecimpl.h 
...
src/vec/vec/utils/vsection.c
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  clang-format             0x000000010622e6bb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  clang-format             0x000000010622d948 llvm::sys::RunSignalHandlers() + 248
2  clang-format             0x000000010622ed20 SignalHandler(int) + 288
3  libsystem_platform.dylib 0x00007fff6fba15fd _sigtramp + 29
4  libsystem_platform.dylib 0x00007f834ae00000 _sigtramp + 18446743540515334688
5  clang-format             0x00000001062c8466 clang::format::WhitespaceManager::alignArrayInitializers(unsigned int, unsigned int) + 118
6  clang-format             0x00000001062c5873 clang::format::WhitespaceManager::generateReplacements() + 275
7  clang-format             0x000000010627a369 clang::format::(anonymous namespace)::Formatter::analyze(clang::format::TokenAnnotator&, llvm::SmallVectorImpl<clang::format::AnnotatedLine*>&, clang::format::FormatTokenLexer&) + 761
8  clang-format             0x000000010629ef11 clang::format::TokenAnalyzer::process() + 833
9  clang-format             0x0000000106287b02 std::__1::__function::__func<clang::format::internal::reformat(clang::format::FormatStyle const&, llvm::StringRef, llvm::ArrayRef<clang::tooling::Range>, unsigned int, unsigned int, unsigned int, llvm::StringRef, clang::format::FormattingAttemptStatus*)::$_10, std::__1::allocator<clang::format::internal::reformat(clang::format::FormatStyle const&, llvm::StringRef, llvm::ArrayRef<clang::tooling::Range>, unsigned int, unsigned int, unsigned int, llvm::StringRef, clang::format::FormattingAttemptStatus*)::$_10>, std::__1::pair<clang::tooling::Replacements, unsigned int> (clang::format::Environment const&)>::operator()(clang::format::Environment const&) + 98
10 clang-format             0x000000010626f7d4 clang::format::internal::reformat(clang::format::FormatStyle const&, llvm::StringRef, llvm::ArrayRef<clang::tooling::Range>, unsigned int, unsigned int, unsigned int, llvm::StringRef, clang::format::FormattingAttemptStatus*) + 1908
11 clang-format             0x00000001062704ae clang::format::reformat(clang::format::FormatStyle const&, llvm::StringRef, llvm::ArrayRef<clang::tooling::Range>, llvm::StringRef, clang::format::FormattingAttemptStatus*) + 62
12 clang-format             0x00000001061cd96d clang::format::format(llvm::StringRef) + 6477
13 clang-format             0x00000001061cb90d main + 1613
14 libdyld.dylib            0x00007fff6f9a8cc9 start + 1
make[1]: [clangformat] Error 1 (ignored)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztV01v2zgQ_TX2hYgh6lsHH9zERQOk2CAOuti9GJRI2dxIpEBSTt1fv0NSSpykTtViD3uoYdj80ps3b4YjspT0uLzfc40q2bZEUFTzhlH0uGcCXSOjOHSMRIrVUrXEoI4og2SN2iOMdVJzI9VxFq1mwdUsGH5xFLSECzQLV7MwtpPhx9v1_aaKoNExo6vx_4KyAyxBLXlgqGqI2HkzHuf2Zr3arJHuy5YbRFDZ75xRYACU9sZ02oPDd8fNvi8X4AV0muYw_l10Sv7DKgNdrnXPNDSQ9ZOLqukpQ2YPlhXRe1SS6sEoUrGFN78xMIBo33ZP_gUwVdwquVOkRUTt-pYJY0l48heDSBd8hB8dXexfj8B_2_FecN_47oJO8QMxdqQkO952zQ9WVXsC_A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