New issue
Advanced search Search tips

Issue 907099 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 20
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Assertion `E && hasScalarEvaluationKind(E->getType()) && "Invalid scalar expression to emit"' failed on clang tot bots

Project Member Reported by thakis@chromium.org, Nov 20

Issue description

FAILED: obj/base/base_unittests/safe_numerics_unittest.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/base_unittests/safe_numerics_unittest.o.d -DMALLOC_WRAPPER_LIB=\"libmalloc_wrapper.so\" -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"347305\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DCR_LIBCXX_REVISION=344254 -DCR_LIBCXXABI_REVISION=344215 -D_LIBCPP_ENABLE_NODISCARD -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DGTEST_API_= -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -DGTEST_HAS_TR1_TUPLE=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DUNIT_TEST -I../.. -Igen -I../../third_party/googletest/custom -I../../third_party/googletest/src/googletest/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/googletest/custom -I../../third_party/googletest/src/googlemock/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -Wno-defaulted-function-deleted -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g2 -ggnu-pubnames -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-shorten-64-to-32 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wno-inconsistent-missing-override -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -c ../../base/safe_numerics_unittest.cc -o obj/base/base_unittests/safe_numerics_unittest.o
clang++: /b/c/b/ToTLinux/src/third_party/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp:4285: llvm::Value* clang::CodeGen::CodeGenFunction::EmitScalarExpr(const clang::Expr*, bool): Assertion `E && hasScalarEvaluationKind(E->getType()) && "Invalid scalar expression to emit"' failed.
Stack dump:
0


Started here: https://ci.chromium.org/buildbot/chromium.clang/ToTLinux/4394

First bad: 347296
Last good: 347289
 
Maybe r347294?

More stack:

3.	../../base/numerics/safe_conversions_impl.h:93:16: Generating code for declaration 'base::internal::IsCompileTimeConstant'
#0 0x000000000258b39a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x258b39a)
#1 0x00000000025898b9 llvm::sys::RunSignalHandlers() (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x25898b9)
#2 0x00000000025899f5 SignalHandler(int) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x25899f5)
#3 0x00007f63697eb330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f636880bc37 gsignal /build/eglibc-ripdx6/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f636880f028 abort /build/eglibc-ripdx6/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f6368804bf6 __assert_fail_base /build/eglibc-ripdx6/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f6368804ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x000000000299654b (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x299654b)
#9 0x00000000028ed816 clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(clang::GlobalDecl, unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x28ed816)
#10 0x000000000296d9d0 clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*, clang::CodeGen::ReturnValueSlot) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x296d9d0)
#11 0x00000000009ea522 (anonymous namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x9ea522)
#12 0x000000000299570a (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x299570a)
#13 0x00000000009ec217 (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x9ec217)
#14 0x0000000002995626 (anonymous namespace)::ScalarExprEmitter::Visit(clang::Expr*) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2995626)
#15 0x0000000002996523 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2996523)
#16 0x000000000277b9ab clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x277b9ab)
repro
safe_numerics_unittest.zip
730 KB Download
Status: Fixed (was: Started)
Confirmed that reverting 347294 fixes this. Landed the revert in 347314..
This broke again in r347364 which I reverted again in r347389.

Sign in to add a comment