[llvm-bugs] [Bug 33804] New: clang crashes when building opencv 2.3 for ARM32 (Thumb2)

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 15 10:56:40 PDT 2017


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

            Bug ID: 33804
           Summary: clang crashes when building opencv 2.3 for ARM32
                    (Thumb2)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: llvm at meinersbur.de
          Reporter: manojgupta at google.com
                CC: llozano at chromium.org, llvm-bugs at lists.llvm.org,
                    pirama at google.com, srhines at google.com

The crash starts at r305938.

commit 52ebe03cb0a728134e66d04f85281bc5a60d7091
Author:     Michael Kruse <llvm at meinersbur.de>
AuthorDate: Wed Jun 21 18:25:37 2017 +0000
Commit:     Michael Kruse <llvm at meinersbur.de>
CommitDate: Wed Jun 21 18:25:37 2017 +0000

    [BasicAA] Use MayAlias instead of PartialAlias for fallback.

Repro: Use the attached preprocessed file.

$ clang++ -Qunused-arguments -grecord-gcc-switches -fstack-protector-strong
-pie -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -mthumb  -O2 -pipe
-march=armv8-a+crc -mtune=cortex-a57.cortex-a53 -mfpu=crypto-neon-fp-armv8
-mfloat-abi=hard -g -O3 -DNDEBUG -fPIC -c emd.ii -o emd.o -target
armv7a-cros-linux-gnueabihf -Wno-parentheses-equality

clang-5.0: clang_src/llvm/lib/IR/Constants.cpp:1424: static llvm::Constant*
llvm::ConstantExpr::getCast(unsigned int, llvm::Constant*, llvm::Type*, bool):
Assertion `CastInst::castIsValid(opc, C, Ty) && "Invalid constantexpr cast!"'
failed.
#0 0x0000000003e84a0f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
clang_src/llvm/lib/Support/Unix/Signals.inc:398:0
#1 0x0000000003e84aa0 PrintStackTraceSignalHandler(void*)
clang_src/llvm/lib/Support/Unix/Signals.inc:462:0
#2 0x0000000003e82ee6 llvm::sys::RunSignalHandlers()
clang_src/llvm/lib/Support/Signals.cpp:49:0
#3 0x0000000003e843a7 SignalHandler(int)
clang_src/llvm/lib/Support/Unix/Signals.inc:252:0
#4 0x00007fc17322b330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00007fc172022c37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00007fc172026028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#7 0x00007fc17201bbf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#8 0x00007fc17201bca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x00000000036ff088 llvm::ConstantExpr::getCast(unsigned int,
llvm::Constant*, llvm::Type*, bool) clang_src/llvm/lib/IR/Constants.cpp:1426:0
#10 0x000000000208ace4
llvm::ConstantFolder::CreateCast(llvm::Instruction::CastOps, llvm::Constant*,
llvm::Type*) const clang_src/llvm/include/llvm/IR/ConstantFolder.h:184:0
#11 0x000000000209371c llvm::IRBuilder<llvm::ConstantFolder,
llvm::IRBuilderDefaultInserter>::CreateCast(llvm::Instruction::CastOps,
llvm::Value*, llvm::Type*, llvm::Twine const&)
clang_src/llvm/include/llvm/IR/IRBuilder.h:1481:0
#12 0x0000000002090f92 llvm::IRBuilder<llvm::ConstantFolder,
llvm::IRBuilderDefaultInserter>::CreateBitCast(llvm::Value*, llvm::Type*,
llvm::Twine const&) clang_src/llvm/include/llvm/IR/IRBuilder.h:1447:0
#13 0x00000000032ce6c2 llvm::IRBuilder<llvm::ConstantFolder,
llvm::IRBuilderDefaultInserter>::CreateBitOrPointerCast(llvm::Value*,
llvm::Type*, llvm::Twine const&)
clang_src/llvm/include/llvm/IR/IRBuilder.h:1526:0
#14 0x0000000003face2a (anonymous
namespace)::InnerLoopVectorizer::vectorizeInterleaveGroup(llvm::Instruction*)
clang_src/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2953:0
#15 0x0000000003fad17c (anonymous
namespace)::InnerLoopVectorizer::vectorizeMemoryInstruction(llvm::Instruction*)
clang_src/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2984:0
#16 0x0000000003fb7720 (anonymous
namespace)::InnerLoopVectorizer::vectorizeInstruction(llvm::Instruction&)
clang_src/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4904:0
#17 0x0000000003fc5c32 (anonymous
namespace)::LoopVectorizationPlanner::executePlan((anonymous
namespace)::InnerLoopVectorizer&)
clang_src/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7692:0
#18 0x0000000003fc7eca llvm::LoopVectorizePass::processLoop(llvm::Loop*)
clang_src/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8010:0
#19 0x0000000003fc86ce llvm::LoopVectorizePass::runImpl(llvm::Function&,
llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&,
llvm::DominatorTree&, llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*,
llvm::DemandedBits&, llvm::AAResults&, llvm::AssumptionCache&,
std::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&)
clang_src/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8090:0
#20 0x0000000003faa379 (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&)
clang_src/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2358:0
#21 0x00000000037dd9a2 llvm::FPPassManager::runOnFunction(llvm::Function&)
clang_src/llvm/lib/IR/LegacyPassManager.cpp:1514:0

The crash is blocking ChromeOS to upgrade to a newer llvm version.

-- 
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/20170715/9c136e2b/attachment-0001.html>


More information about the llvm-bugs mailing list