[clang] clang frontend command failed with exit code 139
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
When trying to compile www-client/ungoogled-chromium-146.0.7680.164_p1:0/0::pf4public under Gentoo Linux ([link to ebuild file](https://github.com/PF4Public/gentoo-overlay/blob/master/www-client/ungoogled-chromium/ungoogled-chromium-146.0.7680.164_p1.ebuild)), I get the following error:
```
Stack dump:
0. Program arguments: /usr/lib/llvm/22/bin/x86_64-pc-linux-gnu-clang++ -MD -MF obj/components/omnibox/browser/browser/omnibox_suggestions_watcher.o.d -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -D_GLIBCXX_ASSERTIONS=1 -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_ENABLE_LEGACY_SHADERCONTEXT -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_PNG_WITH_LIBPNG -DSK_CODEC_ENCODES_PNG -DSK_CODEC_ENCODES_PNG_WITH_LIBPNG -DSK_CODEC_DECODES_JPEG -DSK_CODEC_ENCODES_JPEG -DSK_GAMMA_EXPONENT=1.2 -DSK_GAMMA_CONTRAST=0.2 -DSK_GANESH -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_GL -DSK_VULKAN=1 -DSK_GRAPHITE -DSK_DAWN -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DCHROMIUM -DLIBYUV_DISABLE_NEON -DLIBYUV_DISABLE_SVE -DLIBYUV_DISABLE_SME -DLIBYUV_DISABLE_LSX -DLIBYUV_DISABLE_LASX -DTOOLKIT_VIEWS=1 -DGOOGLE_PROTOBUF_NO_RTTI -DPROTOBUF_INTERNAL_BOUNDS_CHECK_MODE_ABORT -DHAVE_PTHREAD -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -DSKCMS_IMPLEMENTATION=1 -DPROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII=0 -DWEBRTC_ENABLE_AVX2 -DWEBRTC_DEPRECATE_PLAN_B -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DWEBRTC_USE_X11 -DLOGGING_INSIDE_WEBRTC -DLEVELDB_PLATFORM_CHROMIUM=1 -DCRASHPAD_ZLIB_SOURCE_EXTERNAL -DCHROMIUM_ZLIB_NO_CHROMECONF=1 -DUSE_SYSTEM_ZLIB=1 -DVK_NO_PROTOTYPES -DUSE_VULKAN_XCB -DUSE_GIO -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT=0 -DV8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT=0 -DV8_PROMISE_INTERNAL_FIELD_COUNT=0 -DV8_USE_DEFAULT_HASHER_SECRET=true -DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_SHARED_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_ENABLE_SANDBOX -DV8_DEPRECATION_WARNINGS -DV8_USE_PERFETTO -DV8_USE_PERFETTO_JSON_EXPORT -DV8_HAVE_TARGET_OS -DV8_TARGET_OS_LINUX -DCPPGC_CAGED_HEAP -DCPPGC_YOUNG_GENERATION -DCPPGC_POINTER_COMPRESSION -DCPPGC_ENABLE_LARGER_CAGE -DCPPGC_SLIM_WRITE_BARRIER -DFLATBUFFERS_LOCALE_INDEPENDENT=0 -DATK_LIB_DIR=\"/usr/lib64\" -DUSE_ATK_BRIDGE -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/shim_headers/double_conversion_shim -Igen/shim_headers/zlib_shim -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -I../../net/third_party/quiche/overrides -I../../net/third_party/quiche/src/quiche/common/platform/default -I../../net/third_party/quiche/src -Igen/shim_headers/brotli_shim -Igen/shim_headers/zstd_headers -I../../third_party/skia -Igen/third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan-headers/src/include -Igen/third_party/dawn/include -I../../third_party/dawn/include -Igen/shim_headers/libwebp_shim -Igen/shim_headers/snappy_shim -I../../third_party/libyuv/include -Igen/shim_headers/crc32c_shim -Igen/shim_headers/opus_shim -Igen/shim_headers/ffmpeg_shim -Igen/shim_headers/openh264_shim -Igen/third_party/private_membership/src -Igen/third_party/shell-encryption/src -Igen/components/policy/proto -I../../third_party/khronos -I../../gpu -Igen/shim_headers/flac_shim -Igen/shim_headers/minizip_shim -I../../base/allocator/partition_allocator/src -Igen/base/allocator/partition_allocator/src -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/net/third_party/quiche/src -Igen/third_party/metrics_proto -I../../third_party/ipcz/include -I../../third_party/ced/src -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libwebm/source -I../../third_party/angle/include -I../../third_party/crashpad/crashpad -I../../third_party/crashpad/crashpad/compat/linux -I../../third_party/crashpad/crashpad/compat/non_win -I../../third_party/libaom/source/libaom -I../../third_party/libaom/source/config/linux/x64 -I../../v8/include -I../../third_party/flatbuffers/src/include -I../../third_party/flatbuffers/src/src -I../../third_party/flatbuffers/src -I../../third_party/flatbuffers/generated -I../../third_party/re2/src -fprofile-use=../../chrome/build/pgo_profiles/chrome-linux-7680-1774029376-0d6900394e5ebac1f81d4e5506c1b7a179e02ac2-e23fbfe9f6003222e6ad78299d7c729e34da297c.profdata -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date -Wno-backend-plugin -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wgnu -Wno-gnu-anonymous-struct -Wno-gnu-conditional-omitted-operand -Wno-gnu-include-next -Wno-gnu-label-as-value -Wno-gnu-redeclared-enum -Wno-gnu-statement-expression -Wno-gnu-zero-variadic-macro-arguments -Wno-zero-length-array -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wno-cast-function-type -Wno-thread-safety-reference-return -Wno-nontrivial-memcall -Wno-uninitialized-const-pointer -Wexit-time-destructors -Wshadow -fno-delete-null-pointer-checks -fno-strict-overflow -fno-ident -fno-math-errno -fno-strict-aliasing -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../clang-crashreports -mllvm -instcombine-lower-dbg-declare=0 -mllvm -split-threshold-for-reg-with-hint=0 -ffp-contract=off -Wa,--crel,--allow-experimental-crel -flto=thin -fsplit-lto-unit -mllvm -inlinehint-threshold=360 -fwhole-program-vtables -no-canonical-prefixes --warning-suppression-mappings=../../build/config/warning_suppression.txt -ftrivial-auto-var-init=zero -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-omit-frame-pointer -g0 -fsanitize=array-bounds -fsanitize-trap=array-bounds -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -isystem/usr/include/glib-2.0 -isystem/usr/lib64/glib-2.0/include -isystem/usr/lib64/libffi/include -Wno-redundant-parens -Wno-redundant-parens -isystem/usr/include/nspr -isystem/usr/include/nss -isystem/usr/include/openh264 -fsanitize-ignorelist=../../build/linux/unbundle/openh264_encoder_cfi_ignores.txt -isystem/usr/include/blkid -isystem/usr/include/gio-unix-2.0 -isystem/usr/include/glib-2.0 -isystem/usr/include/json-c -isystem/usr/include/libmount -isystem/usr/include/uuid -isystem/usr/lib64/glib-2.0/include -isystem/usr/lib64/libffi/include -Wno-constant-conversion -Wno-shorten-64-to-32 -isystem/usr/include/at-spi-2.0 -isystem/usr/include/at-spi2-atk/2.0 -isystem/usr/include/atk-1.0 -isystem/usr/include/blkid -isystem/usr/include/dbus-1.0 -isystem/usr/include/elogind -isystem/usr/include/glib-2.0 -isystem/usr/include/json-c -isystem/usr/include/libmount -isystem/usr/include/uuid -isystem/usr/lib64/dbus-1.0/include -isystem/usr/lib64/glib-2.0/include -isystem/usr/lib64/libffi/include -Wno-invalid-offsetof -Wenum-compare-conditional -Wno-nullability-completeness -std=c++23 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -U_GLIBCXX_ASSERTIONS -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=native -mfpmath=sse -pipe -U_GLIBCXX_ASSERTIONS -Wno-unknown-warning-option -Wno-builtin-macro-redefined -fcolor-diagnostics -c -o obj/components/omnibox/browser/browser/omnibox_suggestions_watcher.o ../../components/omnibox/browser/omnibox_suggestions_watcher.cc
1. parser at end of file
2. /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/ostream.h:642:5: instantiating function definition 'std::operator<<>'
#0 0x00007f4806abf420 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/22/bin/../lib64/libLLVM.so.22.1+0xebf420)
#1 0x00007f4806abc414 llvm::sys::CleanupOnSignal(unsigned long) (/usr/lib/llvm/22/bin/../lib64/libLLVM.so.22.1+0xebc414)
#2 0x00007f480697a7d8 (/usr/lib/llvm/22/bin/../lib64/libLLVM.so.22.1+0xd7a7d8)
#3 0x00007f4805444630 (/lib64/libc.so.6+0x44630)
#4 0x00007f4811da8cf8 clang::computeDependence(clang::OverloadExpr*, bool, bool, bool) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0xfa8cf8)
#5 0x00007f481200708c clang::OverloadExpr::OverloadExpr(clang::Stmt::StmtClass, clang::ASTContext const&, clang::NestedNameSpecifierLoc, clang::SourceLocation, clang::DeclarationNameInfo const&, clang::TemplateArgumentListInfo const*, clang::UnresolvedSetIterator, clang::UnresolvedSetIterator, bool, bool, bool) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x120708c)
#6 0x00007f481200b8d3 clang::UnresolvedMemberExpr::UnresolvedMemberExpr(clang::ASTContext const&, bool, clang::Expr*, clang::QualType, bool, clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::SourceLocation, clang::DeclarationNameInfo const&, clang::TemplateArgumentListInfo const*, clang::UnresolvedSetIterator, clang::UnresolvedSetIterator) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x120b8d3)
#7 0x00007f481200bbfa clang::UnresolvedMemberExpr::Create(clang::ASTContext const&, bool, clang::Expr*, clang::QualType, bool, clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::SourceLocation, clang::DeclarationNameInfo const&, clang::TemplateArgumentListInfo const*, clang::UnresolvedSetIterator, clang::UnresolvedSetIterator) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x120bbfa)
#8 0x00007f4812d4ca5f clang::Sema::BuildMemberReferenceExpr(clang::Expr*, clang::QualType, clang::SourceLocation, bool, clang::CXXScopeSpec const&, clang::SourceLocation, clang::NamedDecl*, clang::LookupResult&, clang::TemplateArgumentListInfo const*, clang::Scope const*, bool, clang::Sema::ActOnMemberAccessExtraArgs*) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x1f4ca5f)
#9 0x00007f4812d4d836 clang::Sema::BuildMemberReferenceExpr(clang::Expr*, clang::QualType, clang::SourceLocation, bool, clang::CXXScopeSpec&, clang::SourceLocation, clang::NamedDecl*, clang::DeclarationNameInfo const&, clang::TemplateArgumentListInfo const*, clang::Scope const*, clang::Sema::ActOnMemberAccessExtraArgs*) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x1f4d836)
#10 0x00007f481325ed9c (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x245ed9c)
#11 0x00007f481324d390 (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x244d390)
#12 0x00007f4813261106 (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x2461106)
#13 0x00007f4813236590 (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x2436590)
#14 0x00007f4813236dc7 (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x2436dc7)
#15 0x00007f481323113c (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x243113c)
#16 0x00007f4813232188 clang::Sema::SubstStmt(clang::Stmt*, clang::MultiLevelTemplateArgumentList const&) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x2432188)
#17 0x00007f48132fc3e6 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x24fc3e6)
#18 0x00007f48132fa898 clang::Sema::PerformPendingInstantiations(bool, bool) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x24fa898)
#19 0x00007f4812858764 clang::Sema::ActOnEndOfTranslationUnitFragment(clang::TUFragmentKind) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x1a58764)
#20 0x00007f4812858ab1 clang::Sema::ActOnEndOfTranslationUnit() (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x1a58ab1)
#21 0x00007f4811b529e1 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&, clang::Sema::ModuleImportState&) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0xd529e1)
#22 0x00007f48119f6e5c clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0xbf6e5c)
#23 0x00007f48142e5a58 clang::FrontendAction::Execute() (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x34e5a58)
#24 0x00007f481424e64b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x344e64b)
#25 0x00007f481439c970 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x359c970)
#26 0x000055573f7950f0 cc1_main(llvm::ArrayRef, char const*, void*) (/usr/lib/llvm/22/bin/x86_64-pc-linux-gnu-clang+++0x1d0f0)
#27 0x000055573f78a8ab (/usr/lib/llvm/22/bin/x86_64-pc-linux-gnu-clang+++0x128ab)
#28 0x000055573f78d3fa (/usr/lib/llvm/22/bin/x86_64-pc-linux-gnu-clang+++0x153fa)
#29 0x00007f4813d78ccd (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x2f78ccd)
#30 0x00007f480697ac08 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref) (/usr/lib/llvm/22/bin/../lib64/libLLVM.so.22.1+0xd7ac08)
#31 0x00007f4813d7acb9 clang::driver::CC1Command::Execute(llvm::ArrayRef>, std::__cxx11::basic_string, std::allocator>*, bool*) const (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x2f7acb9)
#32 0x00007f4813d20b3d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x2f20b3d)
#33 0x00007f4813d21acf clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl>&, bool) const (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x2f21acf)
#34 0x00007f4813d3bfe5 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl>&) (/usr/lib/llvm/22/bin/../lib64/libclang-cpp.so.22.1+0x2f3bfe5)
#35 0x000055573f78ef98 clang_main(int, char**, llvm::ToolContext const&) (/usr/lib/llvm/22/bin/x86_64-pc-linux-gnu-clang+++0x16f98)
#36 0x000055573f789616 main (/usr/lib/llvm/22/bin/x86_64-pc-linux-gnu-clang+++0x11616)
#37 0x00007f480542760b (/lib64/libc.so.6+0x2760b)
#38 0x00007f48054276ba __libc_start_main (/lib64/libc.so.6+0x276ba)
#39 0x000055573f789685 _start (/usr/lib/llvm/22/bin/x86_64-pc-linux-gnu-clang+++0x11685)
x86_64-pc-linux-gnu-clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 22.1.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/22/bin
Configuration file: /etc/clang/22/x86_64-pc-linux-gnu-clang++.cfg
```
[omnibox_suggestions_watcher-f2524d.cpp](https://github.com/user-attachments/files/26289101/omnibox_suggestions_watcher-f2524d.cpp)
[omnibox_suggestions_watcher-f2524d.sh](https://github.com/user-attachments/files/26289086/omnibox_suggestions_watcher-f2524d.sh)
Contributor guide
Research direction
Start by reproducing the crash with the reported clang++ command while compiling components/omnibox/browser/omnibox_suggestions_watcher.cc. Read the stack around clang::computeDependence and Sema template instantiation, then reduce the failing input if possible. Done means the relevant compilation no longer causes clang to exit with code 139.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100