<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Is there a better way to report this issue?  Maybe I'm the only one using the 16.04 binary packages (not the deb packages) from <a href="http://llvm.org" class="">llvm.org</a>.<div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 9, 2018, at 2:25 PM, Kaveh Vaghefi <<a href="mailto:kaveh@vaghefi.org" class="">kaveh@vaghefi.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I definitely install zlib through the zlib1g package (and it's -dev package).<div class=""><br class=""></div><div class="">It's interesting that you mention zlib.  When we moved to Ubuntu 16.04, we couldn't use the clang-4.0.0-16.04 release because it would complain about zlib.  Dropping in the clang-4.0.0-14.04 worked fine.  I wonder if the Ubuntu 16.04 targeted clang releases are working correctly.  Shouldn't they have zlib enabled?<div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Oct 9, 2018, at 2:11 PM, Reid Kleckner <<a href="mailto:rnk@google.com" class="">rnk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Looks like there's something wrong with the zlib integration. Did you make sure the docker image has zlib? It's also possible that the official release did not have zlib enabled for some reason, that would also cause a crash.</div><div class=""><br class=""></div><div class="">As a workaround, don't request compressed debug info sections.</div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Oct 9, 2018 at 11:21 AM Kaveh Vaghefi via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We run clang in a docker container based on Ubuntu 16.04.  In it we download the tar.xz archive for clang, place it in /opt, and symlink it in using `update-alternatives` (here's the line from our Dockerfile)<br class="">
<br class="">
RUN export CLANG_VERSION=5.0.1 && \<br class="">
    export CLANG_PKG=clang+llvm-$CLANG_VERSION-x86_64-linux-gnu-ubuntu-16.04 && \<br class="">
    wget --progress=bar:force <a href="http://llvm.org/releases/$CLANG_VERSION/$CLANG_PKG.tar.xz" rel="noreferrer" target="_blank" class="">http://llvm.org/releases/$CLANG_VERSION/$CLANG_PKG.tar.xz</a> && \<br class="">
    tar xvfJ $CLANG_PKG.tar.xz -C /opt && \<br class="">
    chmod -R 755 /opt/$CLANG_PKG && \<br class="">
    # make symlinks to abstract compiler version<br class="">
    update-alternatives --install /usr/bin/clang clang /opt/$CLANG_PKG/bin/clang 100 \<br class="">
        --slave /usr/bin/clang++ clang++ /opt/$CLANG_PKG/bin/clang++ \<br class="">
        --slave /usr/bin/llvm-symbolizer llvm-symbolizer /opt/$CLANG_PKG/bin/llvm-symbolizer \<br class="">
        --slave /usr/bin/llvm-profdata llvm-profdata /opt/$CLANG_PKG/bin/llvm-profdata\<br class="">
        --slave /usr/bin/llvm-ar llvm-ar /opt/$CLANG_PKG/bin/llvm-ar \<br class="">
        --slave /usr/bin/lld lld /opt/$CLANG_PKG/bin/lld \<br class="">
        --slave /usr/bin/llvm-nm llvm-nm /opt/$CLANG_PKG/bin/llvm-nm \<br class="">
        --slave /usr/bin/llvm-objdump llvm-objdump /opt/$CLANG_PKG/bin/llvm-objdump \<br class="">
        --slave /usr/bin/clang-format clang-format /opt/$CLANG_PKG/bin/clang-format \<br class="">
        --slave /usr/bin/llvm-ranlib llvm-ranlib /opt/$CLANG_PKG/bin/llvm-ranlib \<br class="">
        --slave /lib/libc++.so libc++.so /opt/$CLANG_PKG/lib/libc++.so \<br class="">
        --slave /lib/libc++.so.1 libc++.so.1 /opt/$CLANG_PKG/lib/libc++.so.1 \<br class="">
        --slave /lib/libc++.so.1.0 libc++.so.1.0 /opt/$CLANG_PKG/lib/libc++.so.1.0 \<br class="">
        --slave /lib/libc++abi.so libc++abi.so /opt/$CLANG_PKG/lib/libc++abi.so \<br class="">
        --slave /lib/libc++abi.so.1 libc++abi.so.1 /opt/$CLANG_PKG/lib/libc++abi.so.1 \<br class="">
        --slave /lib/libc++abi.so.1.0 libc++abi.so.1.0 /opt/$CLANG_PKG/lib/libc++abi.so.1.0 \<br class="">
        --slave /lib/libomp.so libomp.so /opt/$CLANG_PKG/lib/libomp.so<br class="">
<br class="">
I'm finding that if I use any version after 5.0.1, clang exhibits a segmentation fault with the `-g` option passed in.  If I remove the `-debug-info-kind=limited` command on the invocation below, the segmentation fault does not happen.  I believe this is a bug that needs to be fixed, but I'd appreciate the insight of someone more knowledgable with clang.<br class="">
<br class="">
$ /opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0 \<br class="">
> -cc1 \<br class="">
> -triple x86_64-unknown-linux-gnu \<br class="">
> -emit-obj \<br class="">
> --compress-debug-sections \<br class="">
> -disable-free \<br class="">
> -disable-llvm-verifier \<br class="">
> -discard-value-names \<br class="">
> -main-file-name <a href="http://buildinfo_query.cc/" class="">buildinfo_query.cc</a> \<br class="">
> -mrelocation-model static \<br class="">
> -mthread-model posix \<br class="">
> -mdisable-fp-elim \<br class="">
> -fmath-errno \<br class="">
> -masm-verbose \<br class="">
> -mconstructor-aliases \<br class="">
> -munwind-tables \<br class="">
> -fuse-init-array \<br class="">
> -target-cpu x86-64 \<br class="">
> -momit-leaf-frame-pointer \<br class="">
> -dwarf-column-info \<br class="">
> -debug-info-kind=limited \<br class="">
> -dwarf-version=4 \<br class="">
> -debugger-tuning=gdb \<br class="">
> -coverage-notes-file /proc/self/cwd/bazel-out/k8-py3-opt/bin/devtools/_objs/buildinfo_query/devtools/buildinfo_query.gcno \<br class="">
> -resource-dir /opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/lib/clang/5.0.2 \<br class="">
> -dependency-file bazel-out/k8-py3-opt/bin/devtools/_objs/buildinfo_query/devtools/buildinfo_query.d \<br class="">
> -MT bazel-out/k8-py3-opt/bin/devtools/_objs/buildinfo_query/devtools/buildinfo_query.o \<br class="">
> -sys-header-deps \<br class="">
> -iquote . \<br class="">
> -iquote bazel-out/k8-py3-opt/genfiles \<br class="">
> -iquote external/bazel_tools \<br class="">
> -iquote bazel-out/k8-py3-opt/genfiles/external/bazel_tools \<br class="">
> -isystem external/bazel_tools/tools/cpp/gcc3 \<br class="">
> -D NDEBUG \<br class="">
> -internal-isystem /opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/../include/c++/v1 \<br class="">
> -internal-isystem /usr/local/include \<br class="">
> -internal-isystem /opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/lib/clang/5.0.2/include \<br class="">
> -internal-externc-isystem /usr/include/x86_64-linux-gnu \<br class="">
> -internal-externc-isystem /usr/include \<br class="">
> -O3 \<br class="">
> -Wthread-safety \<br class="">
> -Wno-unknown-pragmas \<br class="">
> -Wno-inconsistent-missing-override \<br class="">
> -Wno-deprecated-register \<br class="">
> -Werror \<br class="">
> -Wno-sign-compare \<br class="">
> -Wno-invalid-partial-specialization \<br class="">
> -std=c++1z \<br class="">
> -fdeprecated-macro \<br class="">
> -fdebug-compilation-dir /proc/self/cwd \<br class="">
> -ferror-limit 19 \<br class="">
> -fmessage-length 0 \<br class="">
> -fopenmp \<br class="">
> -fobjc-runtime=gcc \<br class="">
> -fcxx-exceptions \<br class="">
> -fexceptions \<br class="">
> -fdiagnostics-show-option \<br class="">
> -vectorize-loops \<br class="">
> -vectorize-slp \<br class="">
> -o bazel-out/k8-py3-opt/bin/devtools/_objs/buildinfo_query/devtools/buildinfo_query.o \<br class="">
> -x c++ devtools/<a href="http://buildinfo_query.cc/" class="">buildinfo_query.cc</a><br class="">
#0 0x0000000001a63ae4 PrintStackTraceSignalHandler(void*) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x1a63ae4)<br class="">
#1 0x0000000001a63dc6 SignalHandler(int) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x1a63dc6)<br class="">
#2 0x00007fa3729bd390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)<br class="">
#3 0x000000000181e2a4 llvm::Error llvm::handleErrors<llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}>(llvm::Error, llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}&&) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x181e2a4)<br class="">
#4 0x0000000001819b37 (anonymous namespace)::ELFObjectWriter::writeObject(llvm::MCAssembler&, llvm::MCAsmLayout const&) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x1819b37)<br class="">
#5 0x000000000182a8bb llvm::MCAssembler::Finish() (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x182a8bb)<br class="">
#6 0x000000000207ef9c llvm::AsmPrinter::doFinalization(llvm::Module&) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x207ef9c)<br class="">
#7 0x000000000169b163 llvm::FPPassManager::doFinalization(llvm::Module&) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x169b163)<br class="">
#8 0x000000000169b561 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x169b561)<br class="">
#9 0x0000000001ba4dd2 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> >) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x1ba4dd2)<br class="">
#10 0x0000000002298f0d clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x2298f0d)<br class="">
#11 0x00000000024c5636 clang::ParseAST(clang::Sema&, bool, bool) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x24c5636)<br class="">
#12 0x0000000001f2cf0f clang::FrontendAction::Execute() (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x1f2cf0f)<br class="">
#13 0x0000000001ede2b8 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x1ede2b8)<br class="">
#14 0x0000000001fa94ad clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x1fa94ad)<br class="">
#15 0x00000000008afd51 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x8afd51)<br class="">
#16 0x00000000008ae5e6 main (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x8ae5e6)<br class="">
#17 0x00007fa371955830 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20830)<br class="">
#18 0x00000000008ab999 _start (/opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0+0x8ab999)<br class="">
Stack dump:<br class="">
0.      Program arguments: /opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/clang-5.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj --compress-debug-sections -disable-free -disable-llvm-verifier -discard-value-names -main-file-name <a href="http://buildinfo_query.cc/" class="">buildinfo_query.cc</a> -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /proc/self/cwd/bazel-out/k8-py3-opt/bin/devtools/_objs/buildinfo_query/devtools/buildinfo_query.gcno -resource-dir /opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/lib/clang/5.0.2 -dependency-file bazel-out/k8-py3-opt/bin/devtools/_objs/buildinfo_query/devtools/buildinfo_query.d -MT bazel-out/k8-py3-opt/bin/devtools/_objs/buildinfo_query/devtools/buildinfo_query.o -sys-header-deps -iquote . -iquote bazel-out/k8-py3-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/k8-py3-opt/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -D NDEBUG -internal-isystem /opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/bin/../include/c++/v1 -internal-isystem /usr/local/include -internal-isystem /opt/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04/lib/clang/5.0.2/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /usr/include -O3 -Wthread-safety -Wno-unknown-pragmas -Wno-inconsistent-missing-override -Wno-deprecated-register -Werror -Wno-sign-compare -Wno-invalid-partial-specialization -std=c++1z -fdeprecated-macro -fdebug-compilation-dir /proc/self/cwd -ferror-limit 19 -fmessage-length 0 -fopenmp -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o bazel-out/k8-py3-opt/bin/devtools/_objs/buildinfo_query/devtools/buildinfo_query.o -x c++ devtools/<a href="http://buildinfo_query.cc/" class="">buildinfo_query.cc</a><br class="">
1.      <eof> parser at end of file<br class="">
2.      Code generation<br class="">
Segmentation fault (core dumped)<br class="">
<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div></body></html>