Skip to content

Conversation

@davidlt
Copy link
Contributor

@davidlt davidlt commented Jun 8, 2017

This was lost while migrating to newer LLVM/Clang stack.

Otherwise -std=c++11 is added to compilation lines overriding -std=c++1z. Thus Cling/Interpreter ends up in C++11 mode and then we get errors about std::string_view only being available in C++17.

Compiled on Fedora 26 with -Dminimal=ON -Dcxx17=ON. Note, it still fails to build near the end:

FAILED: html/G__Html.cxx lib/libHtml_rdict.pcm lib/libHtml.rootmap
cd /build/build/html && /usr/bin/cmake -E env LD_LIBRARY_PATH=/build/build/lib: ROOTIGNOREPREFIX=1 /build/build/bin/rootcling -rootbuild -f G__Html.cxx -s /build/build/lib/libHtml.so -excludePath /build/root -excludePath /build/build -rml libHtml.so -rmf /build/build/lib/libHtml.rootmap -I/build/root -I/build/root/interpreter/cling/include -I/build/build/include TClassDocOutput.h TDocDirective.h TDocInfo.h TDocOutput.h TDocParser.h THtml.h /build/root/html/inc/LinkDef.h

 *** Break *** segmentation violation

Signed-off-by: David Abdurachmanov [email protected]

This was lost while migrating to newer LLVM/Clang stack.

Signed-off-by: David Abdurachmanov <[email protected]>
@phsft-bot
Copy link

Starting build on gcc49/centos7, native/mac1012, gcc49/slc6, gcc62/slc6, native/ubuntu14 with CMake flags -Dvc=OFF -Dimt=ON -Dccache=ON

@phsft-bot
Copy link

Build failed on ubuntu14/native.
See console output.

@phsft-bot
Copy link

@phsft-bot
Copy link

@phsft-bot
Copy link

@pcanal pcanal merged commit a42a3d1 into root-project:master Jun 8, 2017
@vgvassilev
Copy link
Member

It seems this didn't end up in our llvm.git as it probably won't now and next time it would be wiped away again. I will submit it for upstreaming...

@davidlt
Copy link
Contributor Author

davidlt commented Jun 9, 2017

Here are more details on where segfault happens:

Starting program: /build/davidlt/build/bin/rootcling -rootbuild -f G__Html.cxx -s /build/davidlt/build/lib/libHtml.so -excludePath /build/davidlt/root -excludePath /build/davidlt/build -rml libHtml.so -rmf /build/davidlt/build/lib/libHtml.rootmap -I/build/davidlt/root -I/build/davidlt/root/interpreter/cling/include -I/build/davidlt/build/include TClassDocOutput.h TDocDirective.h TDocInfo.h TDocOutput.h TDocParser.h THtml.h /build/davidlt/root/html/inc/LinkDef.h
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.25-5.fc26.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 62.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff103ee92 in clang::Redeclarable<clang::RedeclarableTemplateDecl>::getFirstDecl (this=0x38) at /build/davidlt/root/interpreter/llvm/src/tools/clang/include/clang/AST/Redeclarable.h:159
159	  const decl_type *getFirstDecl() const { return First; }
Missing separate debuginfos, use: dnf debuginfo-install libgcc-7.1.1-2.fc26.x86_64 libstdc++-7.1.1-2.fc26.x86_64 sssd-client-1.15.2-5.fc26.x86_64 zlib-1.2.11-2.fc26.x86_64
(gdb) bt
#0  0x00007ffff103ee92 in clang::Redeclarable<clang::RedeclarableTemplateDecl>::getFirstDecl (this=0x38) at /build/davidlt/root/interpreter/llvm/src/tools/clang/include/clang/AST/Redeclarable.h:159
#1  0x00007ffff103bfa6 in clang::RedeclarableTemplateDecl::getCanonicalDecl (this=0x0) at /build/davidlt/root/interpreter/llvm/src/tools/clang/include/clang/AST/DeclTemplate.h:828
#2  0x00007ffff103c1b8 in clang::ClassTemplateDecl::getCanonicalDecl (this=0x0) at /build/davidlt/root/interpreter/llvm/src/tools/clang/include/clang/AST/DeclTemplate.h:2126
#3  0x00007ffff10319a4 in ROOT::TMetaUtils::ReSubstTemplateArg (input=..., instance=0x3044f50) at /build/davidlt/root/core/clingutils/src/TClingUtils.cxx:4587
#4  0x00007ffff117457e in TCling::InspectMembers (this=0x68dcc0, insp=..., obj=0x0, cl=0x3084990, isTransient=true) at /build/davidlt/root/core/metacling/src/TCling.cxx:2237
#5  0x00007fffefe107d6 in TClass::CallShowMembers (this=0x3084990, obj=0x0, insp=..., isTransient=true) at /build/davidlt/root/core/meta/src/TClass.cxx:2137
#6  0x00007fffefe0fd69 in TClass::BuildRealData (this=0x3084990, pointer=0x0, isTransient=true) at /build/davidlt/root/core/meta/src/TClass.cxx:1992
#7  0x00007fffefe09ffe in TBuildRealData::Inspect (this=0x7fffffffbba0, cl=0x1a934a0, pname=0x30743f0 "", mname=0x7fffffffb800 "fMethodCounts", add=0x138, isTransient=true) at /build/davidlt/root/core/meta/src/TClass.cxx:851
#8  0x00007ffff1174e44 in TCling::InspectMembers (this=0x68dcc0, insp=..., obj=0x0, cl=0x1a934a0, isTransient=true) at /build/davidlt/root/core/metacling/src/TCling.cxx:2362
#9  0x00007fffefe107d6 in TClass::CallShowMembers (this=0x1a934a0, obj=0x0, insp=..., isTransient=true) at /build/davidlt/root/core/meta/src/TClass.cxx:2137
#10 0x00007fffefe0fd69 in TClass::BuildRealData (this=0x1a934a0, pointer=0x0, isTransient=true) at /build/davidlt/root/core/meta/src/TClass.cxx:1992
#11 0x00007fffefe431b4 in TProtoClass::TProtoClass (this=0x305f4f0, cl=0x1a934a0) at /build/davidlt/root/core/meta/src/TProtoClass.cxx:67
#12 0x00007ffff7b44c50 in CloseStreamerInfoROOTFile (writeEmptyRootPCM=false) at /build/davidlt/root/io/rootpcm/src/rootclingIO.cxx:197
#13 0x00007ffff1147e1e in FinalizeStreamerInfoWriting (interp=..., writeEmptyRootPCM=false) at /build/davidlt/root/core/dictgen/src/rootcling_impl.cxx:2919
#14 0x00007ffff11486a2 in GenerateFullDict (dictStream=..., interp=..., scan=..., ctorTypes=std::__cxx11::list = {...}, isSplit=false, isGenreflex=false, writeEmptyRootPCM=false) at /build/davidlt/root/core/dictgen/src/rootcling_impl.cxx:3050
#15 0x00007ffff115295f in RootClingMain (argc=24, argv=0x7fffffffe3c8, isDeep=false, isGenreflex=false) at /build/davidlt/root/core/dictgen/src/rootcling_impl.cxx:4723
#16 0x00007ffff1157fba in ROOT_rootcling_Driver (argc=24, argv=0x7fffffffe3c8, config=...) at /build/davidlt/root/core/dictgen/src/rootcling_impl.cxx:5910
#17 0x0000000000400bbc in main (argc=24, argv=0x7fffffffe3c8) at /build/davidlt/root/main/src/rootcling.cxx:46

clang::Redeclarable has a bad address.

@vgvassilev
Copy link
Member

It seems that ROOT::TMetaUtils::ReSubstTemplateArg couldn't find the ClassTemplateDecl it expected.

Could we have a reduced example of the code that's being passed and mishandled by TClingUtils.cxx:4587

@davidlt
Copy link
Contributor Author

davidlt commented Jun 9, 2017

Ah, yeah, I didn't check upper frames. Probably TSTdecl->getSpecializedTemplate() produced nullptr.

@vgvassilev
Copy link
Member

As you said the TSTdecl has no specializations. It could be that it was not seen by the interpreter...
Was it expecting some llvm::entity? I.e. On the working build what did it return?

@Axel-Naumann
Copy link
Member

@pcanal needs to have a look here...

@vgvassilev
Copy link
Member

@davidlt
Copy link
Contributor Author

davidlt commented Jun 10, 2017

Here is JIRA ticket for segfault: https://sft.its.cern.ch/jira/browse/ROOT-8825

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants