Open ms178 opened 2 months ago
There is good news and bad news.
1) With a fresher Clang-19 snapshot (1644a31ae93177e1d046878a480ce95484882b2b) I cannot reproduce the original issue any longer.
2) With that newer snapshot and using Polly, I get a slightly different stack trace this time.
Stack dump:
0. Program arguments: clang -I. -I./ -D_FORTIFY_SOURCE=0 -D_ISOC11_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -DBUILDING_swscale -O3 -march=native -mtune=native -mllvm -inline-threshold=1500 -mllvm -polly -mllvm -polly-position=early -mllvm -polly-dependences-computeout=6000000 -mllvm -polly-detect-profitability-min-per-loop-insts=40 -mllvm -polly-tiling=true -mllvm -polly-prevect-width=256 -mllvm -polly-vectorizer=stripmine -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -polly -fmerge-all-constants -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt -mllvm -enable-interleaved-mem-accesses -mllvm -enable-masked-interleaved-mem-accesses -fno-math-errno -fno-trapping-math -falign-functions=32 -funroll-loops -fno-semantic-interposition -fcf-protection=none -mharden-sls=none -fomit-frame-pointer -mprefer-vector-width=256 -flto -fwhole-program-vtables -fsplit-lto-unit -mllvm -adce-remove-loops -mllvm -enable-ext-tsp-block-placement -mllvm -enable-gvn-hoist -mllvm -enable-dfa-jump-thread -Wno-error -fprofile-use=/home/marcus/Downloads/ffmpeg.profdata -ffp-contract=fast -fdata-sections -ffunction-sections -fno-unique-section-names -fsplit-machine-functions -fexcess-precision=fast -freciprocal-math -fcx-limited-range -fno-plt -mtls-dialect=gnu2 -w -march=haswell -std=c17 -fomit-frame-pointer -fPIC -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/bs2b -I/usr/include/libdrm -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -DHWY_SHARED_DEFINE -I/usr/lib/pkgconfig/../../include -I/usr/lib/pkgconfig/../../include/vpl -DMFX_DEPRECATED_OFF -I/usr/include/openjpeg-2.5 -I/usr/include/opus -I/usr/include/opus -D_REENTRANT -I/usr/include/rav1e -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -I/usr/include/webp -pthread -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/pixman-1 -I/usr/include/srt -I/usr/include/svt-av1 -DEB_DLL -I/usr/include/libvmaf -I/usr/include/webp -I/usr/include/webp -DX264_API_IMPORTS -I/usr/include/libxml2 -I/usr/include/vapoursynth -I/usr/include/python3.12 -D_REENTRANT -I/usr/include/libdrm -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -O3 -fno-math-errno -fno-signed-zeros -flto -mstack-alignment=16 -Qunused-arguments -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -I/usr/include/SDL2 -D_REENTRANT -MMD -MF libswscale/swscale_unscaled.d -MT libswscale/swscale_unscaled.o -c -o libswscale/swscale_unscaled.o libswscale/swscale_unscaled.c
1. <eof> parser at end of file
2. Optimizer
CC libavformat/movenccenc.o
CC libavformat/movenchint.o
CC libavformat/mp3dec.o
CC libavformat/mp3enc.o
CC libavformat/mpc.o
CC libavformat/mpc8.o
CC libavformat/mpeg.o
CC libavformat/mpegenc.o
#0 0x00007f50ce8ba1a8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/../lib/libLLVM.so.19.0git+0x2cba1a8)
#1 0x00007f50ce8b9918 llvm::sys::CleanupOnSignal(unsigned long) (/usr/bin/../lib/libLLVM.so.19.0git+0x2cb9918)
#2 0x00007f50ce814639 (/usr/bin/../lib/libLLVM.so.19.0git+0x2c14639)
#3 0x00007f50cb849bf0 (/usr/bin/../lib/libc.so.6+0x49bf0)
#4 0x00007f50cb8b834d pthread_kill (/usr/bin/../lib/libc.so.6+0xb834d)
#5 0x00007f50cb849b32 raise (/usr/bin/../lib/libc.so.6+0x49b32)
#6 0x00007f50cb8284a3 abort (/usr/bin/../lib/libc.so.6+0x284a3)
#7 0x00007f50d1cfd978 (/usr/bin/../lib/libLLVM.so.19.0git+0x60fd978)
#8 0x00007f50d1cfb88f isl_pw_multi_aff_from_map (/usr/bin/../lib/libLLVM.so.19.0git+0x60fb88f)
#9 0x00007f50d1cfc6b5 isl_pw_multi_aff_from_map (/usr/bin/../lib/libLLVM.so.19.0git+0x60fc6b5)
#10 0x00007f50d1bd8eff polly::IslNodeBuilder::preloadUnconditionally(isl_set*, isl_ast_build*, llvm::Instruction*) (/usr/bin/../lib/libLLVM.so.19.0git+0x5fd8eff)
#11 0x00007f50d1bd800e polly::IslNodeBuilder::preloadInvariantLoad(polly::MemoryAccess const&, isl_set*) (/usr/bin/../lib/libLLVM.so.19.0git+0x5fd800e)
#12 0x00007f50d1bd5fa9 polly::IslNodeBuilder::preloadInvariantEquivClass(polly::InvariantEquivClassTy&) (/usr/bin/../lib/libLLVM.so.19.0git+0x5fd5fa9)
#13 0x00007f50d1bd9a4e polly::IslNodeBuilder::preloadInvariantLoads() (/usr/bin/../lib/libLLVM.so.19.0git+0x5fd9a4e)
#14 0x00007f50d1b3bc65 (/usr/bin/../lib/libLLVM.so.19.0git+0x5f3bc65)
#15 0x00007f50d1b3ad8a polly::CodeGenerationPass::run(polly::Scop&, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>&, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&) (/usr/bin/../lib/libLLVM.so.19.0git+0x5f3ad8a)
#16 0x00007f50d1b27ba9 (/usr/bin/../lib/libLLVM.so.19.0git+0x5f27ba9)
#17 0x00007f50d1ba0903 llvm::PassManager<polly::Scop, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&>::run(polly::Scop&, llvm::AnalysisManager<polly::Scop, polly::ScopStandardAnalysisResults&>&, polly::ScopStandardAnalysisResults&, polly::SPMUpdater&) (/usr/bin/../lib/libLLVM.so.19.0git+0x5fa0903)
#18 0x00007f50d1b2ecc7 (/usr/bin/../lib/libLLVM.so.19.0git+0x5f2ecc7)
#19 0x00007f50ce0bc7c3 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/bin/../lib/libLLVM.so.19.0git+0x24bc7c3)
#20 0x00007f50ce0bc3ad (/usr/bin/../lib/libLLVM.so.19.0git+0x24bc3ad)
#21 0x00007f50ce154757 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM.so.19.0git+0x2554757)
#22 0x00007f50ce153f2d (/usr/bin/../lib/libLLVM.so.19.0git+0x2553f2d)
#23 0x00007f50cdfc223d llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/bin/../lib/libLLVM.so.19.0git+0x23c223d)
#24 0x00007f50d3e8fec7 (/usr/bin/../lib/libclang-cpp.so.19.0git+0x168fec7)
#25 0x00007f50d3e8d6df clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/usr/bin/../lib/libclang-cpp.so.19.0git+0x168d6df)
#26 0x00007f50d66449a7 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/bin/../lib/libclang-cpp.so.19.0git+0x3e449a7)
#27 0x00007f50d359c6fe clang::ParseAST(clang::Sema&, bool, bool) (/usr/bin/../lib/libclang-cpp.so.19.0git+0xd9c6fe)
#28 0x00007f50d3ea54b0 clang::FrontendAction::Execute() (/usr/bin/../lib/libclang-cpp.so.19.0git+0x16a54b0)
#29 0x00007f50d3ea5391 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/bin/../lib/libclang-cpp.so.19.0git+0x16a5391)
#30 0x00007f50d740cf22 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/bin/../lib/libclang-cpp.so.19.0git+0x4c0cf22)
#31 0x000000000040ed03 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-19+0x40ed03)
#32 0x000000000040c4e1 (/usr/bin/clang-19+0x40c4e1)
#33 0x00007f50d6e9f659 (/usr/bin/../lib/libclang-cpp.so.19.0git+0x469f659)
#34 0x00007f50ce8148de llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/bin/../lib/libLLVM.so.19.0git+0x2c148de)
#35 0x00007f50d3ff06a1 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/usr/bin/../lib/libclang-cpp.so.19.0git+0x17f06a1)
#36 0x00007f50d3db94c7 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/bin/../lib/libclang-cpp.so.19.0git+0x15b94c7)
#37 0x00007f50d3db92ee clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/bin/../lib/libclang-cpp.so.19.0git+0x15b92ee)
#38 0x000000000040a885 clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang-19+0x40a885)
#39 0x00000000004095f5 main (/usr/bin/clang-19+0x4095f5)
#40 0x00007f50cb829f07 (/usr/bin/../lib/libc.so.6+0x29f07)
#41 0x00007f50cb829fb7 __libc_start_main (/usr/bin/../lib/libc.so.6+0x29fb7)
#42 0x000000000040c021 _start (/usr/bin/clang-19+0x40c021)
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 19.0.0git (/home/marcus/Downloads/llvm-git/llvm-project 1644a31ae93177e1d046878a480ce95484882b2b)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
CC libavformat/mpegts.o
CC libavformat/mpegtsenc.o
CC libavformat/mpegvideodec.o
CC libavformat/mpjpeg.o
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
swscale_unscaled-e3e94b.c.txt swscale_unscaled-e3e94b.sh.txt
Compiling ffmpeg 7.0.1 (f0b747ef1a9b9bfd0942a6d459f642b4b993b378) with clang version 19.0.0git (90fd99c0795711e1cf762a02b29b0a702f86a264) yields this new ICE which seems to be a recent regression as it used to compile fine with an LLVM-snapshot from June 8th.