llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.72k stars 10.94k forks source link

Crash after use of AlignArrayOfStructures: Left #94782

Open pgupta-quantumSi opened 3 weeks ago

pgupta-quantumSi commented 3 weeks ago
  1. Program arguments: clang-format-16 --style=file:src/.clang-format -i src/Tests/IO/raw_pulse_reader_and_writer_tests.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): 0 libLLVM-16.so.1 0x00007f35f9c93ee6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 54 1 libLLVM-16.so.1 0x00007f35f9c92070 llvm::sys::RunSignalHandlers() + 80 2 libLLVM-16.so.1 0x00007f35f9c946c0 3 libpthread.so.0 0x00007f3603ee1420 4 libclang-cpp.so.16 0x00007f36031e7fb0 5 libclang-cpp.so.16 0x00007f36031e79fe clang::format::WhitespaceManager::alignArrayInitializersLeftJustified(clang::format::WhitespaceManager::CellDescriptions&&) + 286 6 libclang-cpp.so.16 0x00007f36031e62de clang::format::WhitespaceManager::alignArrayInitializers(unsigned int, unsigned int) + 110 7 libclang-cpp.so.16 0x00007f36031e3026 clang::format::WhitespaceManager::generateReplacements() + 374 8 libclang-cpp.so.16 0x00007f3603189c98 9 libclang-cpp.so.16 0x00007f36031bd355 clang::format::TokenAnalyzer::process(bool) + 1061 10 libclang-cpp.so.16 0x00007f3603198ebd 11 libclang-cpp.so.16 0x00007f360318237a clang::format::internal::reformat(clang::format::FormatStyle const&, llvm::StringRef, llvm::ArrayRef, unsigned int, unsigned int, unsigned int, llvm::StringRef, clang::format::FormattingAttemptStatus) + 2202 12 libclang-cpp.so.16 0x00007f36031834f1 clang::format::reformat(clang::format::FormatStyle const&, llvm::StringRef, llvm::ArrayRef, llvm::StringRef, clang::format::FormattingAttemptStatus) + 81 13 clang-format-16 0x000055c846d45ff0 14 clang-format-16 0x000055c846d44a64 15 libc.so.6 0x00007f35f87ba083 __libc_start_main + 243 16 clang-format-16 0x000055c846d41d1e xargs: clang-format-16: terminated by signal 11
llvmbot commented 3 weeks ago

@llvm/issue-subscribers-clang-format

Author: None (pgupta-quantumSi)

0. Program arguments: clang-format-16 --style=file:src/.clang-format -i src/Tests/IO/raw_pulse_reader_and_writer_tests.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): 0 libLLVM-16.so.1 0x00007f35f9c93ee6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 54 1 libLLVM-16.so.1 0x00007f35f9c92070 llvm::sys::RunSignalHandlers() + 80 2 libLLVM-16.so.1 0x00007f35f9c946c0 3 libpthread.so.0 0x00007f3603ee1420 4 libclang-cpp.so.16 0x00007f36031e7fb0 5 libclang-cpp.so.16 0x00007f36031e79fe clang::format::WhitespaceManager::alignArrayInitializersLeftJustified(clang::format::WhitespaceManager::CellDescriptions&&) + 286 6 libclang-cpp.so.16 0x00007f36031e62de clang::format::WhitespaceManager::alignArrayInitializers(unsigned int, unsigned int) + 110 7 libclang-cpp.so.16 0x00007f36031e3026 clang::format::WhitespaceManager::generateReplacements() + 374 8 libclang-cpp.so.16 0x00007f3603189c98 9 libclang-cpp.so.16 0x00007f36031bd355 clang::format::TokenAnalyzer::process(bool) + 1061 10 libclang-cpp.so.16 0x00007f3603198ebd 11 libclang-cpp.so.16 0x00007f360318237a 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*) + 2202 12 libclang-cpp.so.16 0x00007f36031834f1 clang::format::reformat(clang::format::FormatStyle const&, llvm::StringRef, llvm::ArrayRef<clang::tooling::Range>, llvm::StringRef, clang::format::FormattingAttemptStatus*) + 81 13 clang-format-16 0x000055c846d45ff0 14 clang-format-16 0x000055c846d44a64 15 libc.so.6 0x00007f35f87ba083 __libc_start_main + 243 16 clang-format-16 0x000055c846d41d1e xargs: clang-format-16: terminated by signal 11
owenca commented 3 weeks ago

We have fixed a number of AlignArrayOfStructures crashes since clang-format-17. Can you test your case using the latest clang-format?