[llvm-bugs] [Bug 52486] New: Memory access failure by having a comma in the end

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 12 04:29:19 PST 2021


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

            Bug ID: 52486
           Summary: Memory access failure by having a comma in the end
           Product: clang-tools-extra
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: clangd
          Assignee: unassignedclangbugs at nondot.org
          Reporter: samisserious-bugs at yahoo.de
                CC: llvm-bugs at lists.llvm.org

PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: clang-format-13 tmp.cpp
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):
/usr/lib/x86_64-linux-gnu/libLLVM-13.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x31)[0x7f1f12433431]
/usr/lib/x86_64-linux-gnu/libLLVM-13.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7f1f124315e0]
/usr/lib/x86_64-linux-gnu/libLLVM-13.so.1(+0xde9932)[0x7f1f12433932]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x138e0)[0x7f1f1ad4b8e0]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.13(+0x2ae8ac3)[0x7f1f1a0deac3]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.13(_ZN5clang6format17WhitespaceManager36alignArrayInitializersRightJustifiedEONS1_16CellDescriptionsE+0x671)[0x7f1f1a0dd711]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.13(_ZN5clang6format17WhitespaceManager22alignArrayInitializersEjj+0x4a)[0x7f1f1a0dd04a]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.13(_ZN5clang6format17WhitespaceManager20generateReplacementsEv+0x186)[0x7f1f1a0da386]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.13(+0x2aa38a5)[0x7f1f1a0998a5]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.13(_ZN5clang6format13TokenAnalyzer7processEv+0x364)[0x7f1f1a0b9cf4]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.13(+0x2aae4f0)[0x7f1f1a0a44f0]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.13(_ZN5clang6format8internal8reformatERKNS0_11FormatStyleEN4llvm9StringRefENS5_8ArrayRefINS_7tooling5RangeEEEjjjS6_PNS0_23FormattingAttemptStatusE+0x89d)[0x7f1f1a092eed]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.13(_ZN5clang6format8reformatERKNS0_11FormatStyleEN4llvm9StringRefENS4_8ArrayRefINS_7tooling5RangeEEES5_PNS0_23FormattingAttemptStatusE+0x51)[0x7f1f1a093691]
clang-format-13[0x409131]
clang-format-13[0x4081f4]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea)[0x7f1f1113fe4a]
clang-format-13[0x40742a]
Speicherzugriffsfehler




#include <vector>

struct Vec2 {
    double x;
    double y;
};

auto func(std::vector<Vec2> const & param) -> auto { return param; }

 auto main() -> int {
    auto const spline = func(std::vector<Vec2>{{
        Vec2{50, 50},
         Vec2{180, 160},
         Vec2{200, 200},
         Vec2{50, 200},
         Vec2{180, 225},
         Vec2{180, 50},
     }});
    return 0;
 }

-- 
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/20211112/335b1323/attachment.html>


More information about the llvm-bugs mailing list