ClangToTWin fails compile with clang assert |
||
Issue descriptionFirst failing here: https://ci.chromium.org/buildbot/chromium.clang/ToTWin/1943 From a local repro: clang-cl: ../include/llvm/ADT/SmallVector.h:178: const T& llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::back() const [with T = clang::APValue::LValuePathEntry; <template-parameter-1-2> = void; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::const_reference = const clang::APValue::LValuePathEntry&]: Assertion `!empty()' failed. Stack dump: 0. Program arguments: ../../../../llvm/llvm.svn/build.release/bin/clang-cl -cc1 -triple i386-pc-windows-msvc19.11.0 -emit-obj -disable-free -main-file-name wintz.cpp -mrelocation-model static -mthr ead-model posix -fmerge-all-constants -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -mllvm -x86-asm-syntax=intel -D_MT -flto-visibility-public -std --dependent-lib=libcmt --dependent-lib=oldnames --show-includes -stack-protector 2 -fms-volatile -fdiagnostics-format msvc -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -ffuncti on-sections -fdata-sections -coverage-notes-file /work/chromium/src/out/win_cross/wintz.gcno -nostdsysteminc -resource-dir ../../../../llvm/llvm.svn/build.release/lib/clang/7.0.0 -D U_COMMON_IMPLEMENTAT ION -D U_ICUDATAENTRY_IN_COMMON -D V8_DEPRECATION_WARNINGS -D USE_AURA=1 -D NO_TCMALLOC -D FULL_SAFE_BROWSING -D SAFE_BROWSING_CSD -D SAFE_BROWSING_DB_LOCAL -D OFFICIAL_BUILD -D GOOGLE_CHROME_BUILD -D _ HAS_EXCEPTIONS=0 -D __STD_C -D _CRT_RAND_S -D _CRT_SECURE_NO_DEPRECATE -D _SCL_SECURE_NO_DEPRECATE -D _ATL_NO_OPENGL -D _WINDOWS -D CERT_CHAIN_PARA_HAS_EXTRA_FIELDS -D PSAPI_VERSION=1 -D WIN32 -D _SECUR E_ATL -D _USING_V110_SDK71_ -D WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D WIN32_LEAN_AND_MEAN -D NOMINMAX -D _UNICODE -D UNICODE -D NTDDI_VERSION=0x0A000002 -D _WIN32_WINNT=0x0A00 -D WINVER=0x0A00 -D ND EBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -D _CRT_NONSTDC_NO_WARNINGS -D _CRT_NONSTDC_NO_DEPRECATE -D HAVE_DLOPEN=0 -D UCONFIG_ONLY_HTML_CONVERSION=1 -D U_CHARSET_IS_UTF8=1 -D U_USING_ICU_NAMES PACE=0 -D U_ENABLE_DYLOAD=0 -D U_STATIC_IMPLEMENTATION -D ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -D UCHAR_TYPE=wchar_t -I ../.. -I gen -I ../../third_party/icu/source/common -I ../../third_party/icu/sour ce/i18n -internal-isystem ../../../../llvm/llvm.svn/build.release/lib/clang/7.0.0/include -internal-isystem ../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/ win_sdk/Include/10.0.17134.0/um -internal-isystem ../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/win_sdk/Include/10.0.17134.0/shared -internal-isystem ../. ./third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/win_sdk/Include/10.0.17134.0/winrt -internal-isystem ../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec 615cf20ee342f3bc29bc991b5ad66d8d2c/win_sdk/Include/10.0.17134.0/ucrt -internal-isystem ../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/VC/Tools/MSVC/14.14.$ 6428/include -internal-isystem ../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/VC/Tools/MSVC/14.14.26428/atlmfc/include -Os -Wheader-hygiene -Wstring-conve$ sion -Wtautological-overlap-compare -Wall -Wno-deprecated-declarations -Wno-unused-variable -Werror -Wno-unused-parameter -Wno-deprecated-declarations -Wno-sign-compare -Wno-missing-field-initializers $ Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused$ lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-ignored-pragma-optimize -Wno-macro-redefined -Wno-parentheses -Wno-unused-function -Wno-deprecated-declarations -fdeprecated-ma$ ro -fdebug-compilation-dir /work/chromium/src/out/win_cross -ferror-limit 19 -fmessage-length 0 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.11 -std=c++14 -fdela$ ed-template-parsing -finline-functions -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o obj/third_party/icu/icuuc/wintz.obj -x c++ ../../third_party/i$ u/source/common/wintz.cpp -fcomplete-member-pointers 1. <eof> parser at end of file 2. ../../third_party/icu/source/common/wintz.cpp:213:1 <Spelling=../../third_party/icu/source/common/unicode/umachine.h:79:27>: LLVM IR generation of declaration 3. ../../third_party/icu/source/common/wintz.cpp:214:1: Generating code for declaration 'uprv_detectWindowsTimeZone' #0 0x00005644028e3c7a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2583c7a) #1 0x00005644028e21b4 llvm::sys::RunSignalHandlers() (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x25821b4) #2 0x00005644028e22e2 SignalHandler(int) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x25822e2) #3 0x00007f35df57e0c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0) #4 0x00007f35de10ffcf gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf) #5 0x00007f35de1113fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa) #6 0x00007f35de108e37 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37) #7 0x00007f35de108ee2 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2) #8 0x00005644043e85c3 (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x40885c3) #9 0x0000564400f20ee5 (anonymous namespace)::SubobjectDesignator::getType(clang::ASTContext&) const (.part.2006) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0xbc0ee5) #10 0x0000564400f30719 (anonymous namespace)::PointerExprEvaluator::VisitBuiltinCallExpr(clang::CallExpr const*, unsigned int) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0xbd0719) #11 0x0000564404401b85 clang::StmtVisitorBase<clang::make_const_ptr, (anonymous namespace)::PointerExprEvaluator, bool>::Visit(clang::Stmt const*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0 x40a1b85) #12 0x0000564404402675 EvaluatePointer(clang::Expr const*, (anonymous namespace)::LValue&, (anonymous namespace)::EvalInfo&, bool) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x40a2675) #13 0x00005644043fade6 Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x409ade6) #14 0x00005644043fbe76 EvaluateAsRValue((anonymous namespace)::EvalInfo&, clang::Expr const*, clang::APValue&) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x409be76) #15 0x00005644043fc097 clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext const&) const (.part.2271) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x409c097) #16 0x00005644043fc26e clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext const&) const (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x409c26e) #17 0x0000564402c72f3a clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(clang::FunctionDecl const*, unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot) (../../../../llvm/llvm.svn/bui$ d.release/bin/clang-cl+0x2912f3a) #18 0x0000564402cff4f1 clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*, clang::CodeGen::ReturnValueSlot) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x299f4f1) #19 0x0000564400d812f2 (anonymous namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0xa212f2) #20 0x0000564402d23c1e (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x29c3c1e) #21 0x0000564402d24e83 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x29c4e83) #22 0x0000564402ce42ee clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x29842ee) #23 0x0000564402cf6406 clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2996406) #24 0x0000564402b2134f clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x27c134f) #25 0x0000564402b21a03 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (../../../../llvm/llvm.svn/build.release/bin/clang-c$ +0x27c1a03) #26 0x0000564402b58610 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&, clang::Stmt const*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x27f8610) #27 0x0000564402b66fc6 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2$ 06fc6) #28 0x0000564402b924aa clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x28324aa) #29 0x0000564402ba4a98 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2844a98) #30 0x0000564402ba5d18 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2845d18) #31 0x0000564402ba696d clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.6600) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x284696d) #32 0x0000564402ba6f16 clang::CodeGen::CodeGenModule::EmitDeclContext(clang::DeclContext const*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2846f16) #33 0x0000564402ba65e5 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.6600) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x28465e5) #34 0x000056440329ac2d (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2f3ac2d) #35 0x000056440328fe5d clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2f2fe5d) #36 0x0000564403a6c454 clang::ParseAST(clang::Sema&, bool, bool) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x370c454) #37 0x0000564403298030 clang::CodeGenAction::ExecuteAction() (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2f38030) #38 0x0000564402f28f5e clang::FrontendAction::Execute() (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2bc8f5e) #39 0x0000564402eeeb0e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2b8eb0e) #40 0x0000564402fc9b0b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0x2c69b0b) #41 0x0000564400fcb1a8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0xc6b1a8) #42 0x0000564400f42abc main (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0xbe2abc) #43 0x00007f35de0fd2b1 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b1) #44 0x0000564400fc6d4a _start (../../../../llvm/llvm.svn/build.release/bin/clang-cl+0xc66d4a) clang-cl: error: unable to execute command: Aborted clang-cl: error: clang frontend command failed due to signal (use -v to see invocation) clang version 7.0.0 (trunk 338515) Target: i386-pc-windows-msvc Thread model: posix InstalledDir: ../../../../llvm/llvm.svn/build.release/bin clang-cl: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-cl: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-cl: note: diagnostic msg: /tmp/wintz-5bcbfd.cpp clang-cl: note: diagnostic msg: /tmp/wintz-5bcbfd.sh clang-cl: note: diagnostic msg: ******************** ninja: build stopped: subcommand failed.
,
Aug 1
Bisection points to r338455
,
Aug 1
Reduced:
extern "C" void *memcpy(void *, void const *, size_t);
typedef struct { int a; } b;
void c() {
int d;
b e;
memcpy(&d, (char *)&e.a, sizeof(e));
}
$ clang -cc1 -triple i386-pc-windows-msvc19.11.0 -emit-obj -fms-extensions -fms-compatibility a.ii
,
Aug 1
|
||
►
Sign in to add a comment |
||
Comment 1 by h...@chromium.org
, Aug 1Status: Assigned (was: Untriaged)
7.4 MB
7.4 MB View Download
10.8 KB
10.8 KB View Download