[PATCH] D98147: [SCEV] Improve modelling for pointer constants

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 14:32:54 PST 2021


morehouse added a comment.

This change appears to have broken the UBSan bot:  https://lab.llvm.org/buildbot/#/builders/85/builds/3062/steps/7/logs/stdio

  clang++: /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5169: llvm::BasicBlock::iterator {anonymous}::LSRInstance::AdjustInsertPositionForExpand(llvm::BasicBlock::iterator, const {anonymous}::LSRFixup&, const {anonymous}::LSRUse&, llvm::SCEVExpander&) const: Assertion `!isa<PHINode>(LowestIP) && !LowestIP->isEHPad() && !isa<DbgInfoIntrinsic>(LowestIP) && "Insertion point must be a normal instruction"' 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: /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang++ -DNDEBUG -D_GNU_SOURCE -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_LINK_PTHREAD_LIB -D_LIBCPP_LINK_RT_LIB -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/libcxx/src -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/libcxx/src -Iinclude -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include -Iprojects/libcxx/include/c++build -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -fno-omit-frame-pointer -gline-tables-only -fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all -fsanitize-blacklist=/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/sanitizers/ubsan_blacklist.txt -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DLIBCXX_BUILDING_LIBCXXABI -UNDEBUG -faligned-allocation -nostdinc++ -fvisibility-inlines-hidden -fvisibility=hidden -Wall -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-ignored-attributes -Wno-error -I /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include/c++/v1 -include /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/projects/libcxx/__config_site -std=c++2a -MD -MT projects/libcxx/src/CMakeFiles/cxx_static.dir/ios.instantiations.cpp.o -MF projects/libcxx/src/CMakeFiles/cxx_static.dir/ios.instantiations.cpp.o.d -o projects/libcxx/src/CMakeFiles/cxx_static.dir/ios.instantiations.cpp.o -c /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/libcxx/src/ios.instantiations.cpp
  1.	<eof> parser at end of file
  2.	Code generation
  3.	Running pass 'Function Pass Manager' on module '/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/libcxx/src/ios.instantiations.cpp'.
  4.	Running pass 'Loop Pass Manager' on function '@_ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc'
  5.	Running pass 'Loop Strength Reduction' on basic block '%invoke.cont'
   #0 0x000055e49af53b8c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x33bcb8c)
   #1 0x000055e49af518c4 llvm::sys::RunSignalHandlers() (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x33ba8c4)
   #2 0x000055e49af51b3b llvm::sys::CleanupOnSignal(unsigned long) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x33bab3b)
   #3 0x000055e49aeb4e98 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
   #4 0x00007fb68097e730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
   #5 0x00007fb6802647bb raise (/lib/x86_64-linux-gnu/libc.so.6+0x377bb)
   #6 0x00007fb68024f535 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22535)
   #7 0x00007fb68024f40f (/lib/x86_64-linux-gnu/libc.so.6+0x2240f)
   #8 0x00007fb68025d102 (/lib/x86_64-linux-gnu/libc.so.6+0x30102)
   #9 0x000055e49ad467ff (anonymous namespace)::LSRInstance::Expand((anonymous namespace)::LSRUse const&, (anonymous namespace)::LSRFixup const&, (anonymous namespace)::Formula const&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, false>, llvm::SCEVExpander&, llvm::SmallVectorImpl<llvm::WeakTrackingVH>&) const LoopStrengthReduce.cpp:0:0
  #10 0x000055e49ad52b02 (anonymous namespace)::LSRInstance::ImplementSolution(llvm::SmallVectorImpl<(anonymous namespace)::Formula const*> const&) LoopStrengthReduce.cpp:0:0
  #11 0x000055e49ad581c1 (anonymous namespace)::LSRInstance::LSRInstance(llvm::Loop*, llvm::IVUsers&, llvm::ScalarEvolution&, llvm::DominatorTree&, llvm::LoopInfo&, llvm::TargetTransformInfo const&, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::MemorySSAUpdater*) LoopStrengthReduce.cpp:0:0
  #12 0x000055e49ad5a81e ReduceLoopStrength(llvm::Loop*, llvm::IVUsers&, llvm::ScalarEvolution&, llvm::DominatorTree&, llvm::LoopInfo&, llvm::TargetTransformInfo const&, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::MemorySSA*) LoopStrengthReduce.cpp:0:0
  #13 0x000055e49ad5d33a (anonymous namespace)::LoopStrengthReduce::runOnLoop(llvm::Loop*, llvm::LPPassManager&) LoopStrengthReduce.cpp:0:0
  #14 0x000055e49a03b123 llvm::LPPassManager::runOnFunction(llvm::Function&) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x24a4123)
  #15 0x000055e49a7412bc llvm::FPPassManager::runOnFunction(llvm::Function&) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x2baa2bc)
  #16 0x000055e49a741de9 llvm::FPPassManager::runOnModule(llvm::Module&) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x2baade9)
  #17 0x000055e49a740c11 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x2ba9c11)
  #18 0x000055e49b207e57 (anonymous namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) BackendUtil.cpp:0:0
  #19 0x000055e49b20b075 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x3674075)
  #20 0x000055e49be46e53 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) crtstuff.c:0:0
  #21 0x000055e49c959709 clang::ParseAST(clang::Sema&, bool, bool) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x4dc2709)
  #22 0x000055e49be45c88 clang::CodeGenAction::ExecuteAction() (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x42aec88)
  #23 0x000055e49b7f0701 clang::FrontendAction::Execute() (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x3c59701)
  #24 0x000055e49b78f921 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x3bf8921)
  #25 0x000055e49b8b4ac0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x3d1dac0)
  #26 0x000055e498bedae2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x1056ae2)
  #27 0x000055e498bea0e7 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
  #28 0x000055e49b647055 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) Job.cpp:0:0
  #29 0x000055e49aeb5002 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x331e002)
  #30 0x000055e49b64838c 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.185) Job.cpp:0:0
  #31 0x000055e49b621486 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x3a8a486)
  #32 0x000055e49b621f47 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x3a8af47)
  #33 0x000055e49b62a401 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x3a93401)
  #34 0x000055e498b1b589 main (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0xf84589)
  #35 0x00007fb68025109b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
  #36 0x000055e498be9bba _start (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang+++0x1052bba)

Please take a look.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98147/new/

https://reviews.llvm.org/D98147



More information about the llvm-commits mailing list