[llvm-bugs] [Bug 48889] New: ScalarExprEmitter::VisitAbstractConditionalOperator(const clang::AbstractConditionalOperator*): Assertion `!RHS && "LHS and RHS types must match"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 26 10:13:58 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48889

            Bug ID: 48889
           Summary: ScalarExprEmitter::VisitAbstractConditionalOperator(co
                    nst clang::AbstractConditionalOperator*): Assertion
                    `!RHS && "LHS and RHS types must match"' failed
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: maic23 at live.de
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

clang++: /root/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:4543:
llvm::Value*
{anonymous}::ScalarExprEmitter::VisitAbstractConditionalOperator(const
clang::AbstractConditionalOperator*): Assertion `!RHS && "LHS and RHS types
must match"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments:
/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang++ -std=c++17 -pthread
-Wstack-protector -fstack-protector-all -fcf-protection=full
-fstack-clash-protection -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla
-Wshadow-field -Wswitch -Wthread-safety -Wrange-loop-analysis -Wredundant-decls
-Wunused-variable -Wunused-member-function -Wdate-time
-Wconditional-uninitialized -Wsign-compare -Woverloaded-virtual
-Wsuggest-override -Wunreachable-code-loop-increment -Wno-unused-parameter
-Wno-self-assign -Wno-unused-local-typedef -Wno-deprecated-register
-Wno-implicit-fallthrough -Wno-deprecated-copy
-fsanitize=address,fuzzer,undefined -fPIE -g -O2 -fcolor-diagnostics
-DHAVE_CONFIG_H -I. -I../src/config -DABORT_ON_FAILED_ASSUME -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=2 -I. -I./secp256k1/include -DBOOST_SP_USE_STD_ATOMIC
-DBOOST_AC_USE_STD_ATOMIC -I/usr/include -I./leveldb/include
-I./leveldb/helpers/memenv -I./univalue/include -DHAVE_BUILD_INFO
-D__STDC_FORMAT_MACROS -c -o test/fuzz/fuzz-banman.o test/fuzz/banman.cpp
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      ./test/fuzz/util.h:40:6: Generating code for declaration 'CallOneOf'
 #0 0x0000557243375ee1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x34daee1)
 #1 0x0000557243373b94 llvm::sys::RunSignalHandlers()
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x34d8b94)
 #2 0x0000557243373e31 llvm::sys::CleanupOnSignal(unsigned long)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x34d8e31)
 #3 0x00005572432d2bc8 CrashRecoverySignalHandler(int)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3437bc8)
 #4 0x00007f8df62a53c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #5 0x00007f8df5d6118b raise
/build/glibc-ZN95T4/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #6 0x00007f8df5d40859 abort /build/glibc-ZN95T4/glibc-2.31/stdlib/abort.c:81:7
 #7 0x00007f8df5d40729 get_sysdep_segment_value
/build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:509:8
 #8 0x00007f8df5d40729 _nl_load_domain
/build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:970:34
 #9 0x00007f8df5d51f36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
#10 0x00005572439edce0 (anonymous
namespace)::ScalarExprEmitter::VisitAbstractConditionalOperator(clang::AbstractConditionalOperator
const*) (/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b52ce0)
#11 0x00005572439edee3 (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b52ee3)
#12 0x00005572439edeff (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b52eff)
#13 0x00005572439effea
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b54fea)
#14 0x0000557243997847 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr
const*, clang::CodeGen::AggValueSlot, bool)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3afc847)
#15 0x00005572439ab31e
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b1031e)
#16 0x00005572439eee75 (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b53e75)
#17 0x00005572439eee9b (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b53e9b)
#18 0x00005572439eee9b (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b53e9b)
#19 0x00005572439eee9b (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b53e9b)
#20 0x00005572439effea
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3b54fea)
#21 0x0000557243997847 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr
const*, clang::CodeGen::AggValueSlot, bool)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3afc847)
#22 0x00005572436c3ef2
clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3828ef2)
#23 0x00005572436c5b85 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x382ab85)
#24 0x00005572436c5d7c
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x382ad7c)
#25 0x000055724371d9b1
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x38829b1)
#26 0x000055724372f5de
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x38945de)
#27 0x0000557243788204
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x38ed204)
#28 0x0000557243785345
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x38ea345)
#29 0x000055724378e25d clang::CodeGen::CodeGenModule::EmitDeferred()
(.localalias)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x38f325d)
#30 0x000055724378e82c clang::CodeGen::CodeGenModule::Release()
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x38f382c)
#31 0x00005572443f8afa (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x455dafa)
#32 0x00005572443f7734
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x455c734)
#33 0x00005572450fd5a9 clang::ParseAST(clang::Sema&, bool, bool)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x52625a9)
#34 0x00005572443f6608 clang::CodeGenAction::ExecuteAction()
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x455b608)
#35 0x0000557243cf5459 clang::FrontendAction::Execute()
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3e5a459)
#36 0x0000557243c947de
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3df97de)
#37 0x0000557243dcccd0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3f31cd0)
#38 0x0000557240e6505d cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0xfca05d)
#39 0x0000557240e618b8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0xfc68b8)
#40 0x0000557243b395c9 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()>(long)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3c9e5c9)
#41 0x00005572432d2d4c
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3437d4c)
#42 0x0000557243b3a167
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (.part.0)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3c9f167)
#43 0x0000557243b0d7fb
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3c727fb)
#44 0x0000557243b0e319
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3c73319)
#45 0x0000557243b18cb9
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0x3c7dcb9)
#46 0x0000557240daa5e9 main
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0xf0f5e9)
#47 0x00007f8df5d420b3 __libc_start_main
/build/glibc-ZN95T4/glibc-2.31/csu/../csu/libc-start.c:342:3
#48 0x0000557240e6140e _start
(/root/llvm-project/build_libfuzzer_2021_01_26/bin/clang+++0xfc640e)
clang-12: error: clang frontend command failed with exit code 134 (use -v to
see invocation)
clang version 12.0.0 (https://github.com/llvm/llvm-project.git
ed396212da41feed9bffb8cc1ca6518ab031a3c7)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /root/llvm-project/build_libfuzzer_2021_01_26/bin
clang-12: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/banman-dda1a2.cpp
clang-12: note: diagnostic msg: /tmp/banman-dda1a2.sh
clang-12: note: diagnostic msg: 

********************

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210126/1d0f4b18/attachment-0001.html>


More information about the llvm-bugs mailing list