Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion `V.Var == Var && "conflicting variable"' failed. #32324

Closed
zmodem opened this issue May 9, 2017 · 9 comments
Closed

Assertion `V.Var == Var && "conflicting variable"' failed. #32324

zmodem opened this issue May 9, 2017 · 9 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla

Comments

@zmodem
Copy link
Collaborator

zmodem commented May 9, 2017

Bugzilla Link 32977
Resolution FIXED
Resolved on May 09, 2017 13:00
Version 4.0
OS Linux
Attachments preprocessed source, invocation
CC @adrian-prantl,@rengolin

Extended Description

Hitting this assert in a Chromium build on Linux with tip-of-tree Clang:

[1/1] CXX obj/base/allocator/tcmalloc/thread_cache.o
FAILED: obj/base/allocator/tcmalloc/thread_cache.o
../../../../../../../../work/llvm/build.release/bin/clang++ -MMD -MF obj/base/allocator/tcmalloc/thread_cache.o.d -DNO_HEAP_CHECK -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=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 -DCR_CLANG_REVISION="298540" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DTCMALLOC_D
ONT_REPLACE_SYSTEM_ALLOC -I../../base/allocator -I../../third_party/tcmalloc/chromium/src/base -I../../third_party/tcmalloc/chromium/src -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D
TIMESTAMP= -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -m64 -march=x86-64 -pthread -fomit-frame-pointer -g2 --sysroot=../../build/linux/debian_jessie_amd64-sysroot -fvisibility=hidden -Wheader-hygiene -Wstring-co
nversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-temp
late -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-reorder -Wno-unused-function -Wno-unused-local-typedefs -Wno-unused-private-field -Wno-sign-compare -Wno-unused-result -O2 -fno-ident -fdata-sectio
ns -ffunction-sections -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -Wno-deprecated -c ../../third_party/tcmalloc/chromium/src/thread_cache.cc -o obj/base/allocator/tcmalloc/thread_cache.o
clang-4.0: ../lib/CodeGen/AsmPrinter/DwarfDebug.h:131: void llvm::DbgVariable::addMMIEntry(const llvm::DbgVariable&): Assertion `V.Var == Var && "conflicting variable"' failed.
#​0 0x0000000001f4322a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x1f4322a)
#​1 0x0000000001f4123e llvm::sys::RunSignalHandlers() (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x1f4123e)
#​2 0x0000000001f413a2 SignalHandler(int) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x1f413a2)
#​3 0x00007f686f8c8330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#​4 0x00007f686e6b9c37 gsignal /build/eglibc-MjiXCM/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#​5 0x00007f686e6bd028 abort /build/eglibc-MjiXCM/eglibc-2.19/stdlib/abort.c:91:0
#​6 0x00007f686e6b2bf6 __assert_fail_base /build/eglibc-MjiXCM/eglibc-2.19/assert/assert.c:92:0
#​7 0x00007f686e6b2ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#​8 0x00000000024fd43a llvm::DwarfFile::addScopeVariable(llvm::LexicalScope*, llvm::DbgVariable*) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x24fd43a)
#​9 0x00000000024f3852 llvm::DwarfDebug::createAbstractVariable(llvm::DILocalVariable const*, llvm::LexicalScope*) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x24f3852)
#​10 0x00000000024f3a93 llvm::DwarfDebug::ensureAbstractVariableIsCreated(std::pair<llvm::DILocalVariable const*, llvm::DILocation const*>, llvm::MDNode const*) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x24f3a93)
#​11 0x00000000024f51e5 llvm::DwarfDebug::endFunctionImpl(llvm::MachineFunction const*) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x24f51e5)
#​12 0x0000000002528448 llvm::DebugHandlerBase::endFunction(llvm::MachineFunction const*) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x2528448)
#​13 0x00000000024d6159 llvm::AsmPrinter::EmitFunctionBody() (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x24d6159)
#​14 0x0000000001407d40 llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x1407d40)
#​15 0x0000000001846da5 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x1846da5)
#​16 0x0000000001b19c33 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x1b19c33)
#​17 0x0000000001b19cdc llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x1b19cdc)
#​18 0x0000000001b1aa3f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x1b1aa3f)
#​19 0x00000000020c67fe (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x20c67fe)
#​20 0x00000000020c7b59 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_p
tr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x20c7b59)
#​21 0x0000000002740b6b clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x2740b6b)
#​22 0x0000000002b2ace2 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x2b2ace2)
#​23 0x000000000274023f clang::CodeGenAction::ExecuteAction() (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x274023f)
#​24 0x000000000243ec76 clang::FrontendAction::Execute() (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x243ec76)
#​25 0x0000000002418b16 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x2418b16)
#​26 0x00000000024c92f4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/google/work/llvm/build.release/bin/clang-4.0+0x24c92f4)

@zmodem
Copy link
Collaborator Author

zmodem commented May 9, 2017

assigned to @adrian-prantl

@zmodem
Copy link
Collaborator Author

zmodem commented May 9, 2017

This seems to have regressed with:


r302469 | adrian | 2017-05-08 14:17:08 -0700 (Mon, 08 May 2017) | 13 lines

Make it illegal for two Functions to point to the same DISubprogram

As recently discussed on llvm-dev [1], this patch makes it illegal for
two Functions to point to the same DISubprogram and updates
FunctionCloner to also clone the debug info of a function to conform
to the new requirement. To simplify the implementation it also factors
out the creation of inlineAt locations from the Inliner into a
general-purpose utility in DILocation.

[1] http://lists.llvm.org/pipermail/llvm-dev/2017-May/112661.html
rdar://problem/31926379

Differential Revision: https://reviews.llvm.org/D32975

I have reverted that in r302533

@llvmbot
Copy link
Collaborator

llvmbot commented May 9, 2017

This has also popped up as #32319 .

@zmodem
Copy link
Collaborator Author

zmodem commented May 9, 2017

Also reverted the Clang test change in r302542

@rnk
Copy link
Collaborator

rnk commented May 9, 2017

*** Bug #32319 has been marked as a duplicate of this bug. ***

@adrian-prantl
Copy link
Collaborator

Thanks for reverting, by the way!

@llvmbot
Copy link
Collaborator

llvmbot commented May 9, 2017

*** Bug #32323 has been marked as a duplicate of this bug. ***

@adrian-prantl
Copy link
Collaborator

Fixed in r302576

@adrian-prantl
Copy link
Collaborator

mentioned in issue llvm/llvm-bugzilla-archive#33157

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

4 participants