pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/55801: clang-10 crashes



>Number:         55801
>Category:       pkg
>Synopsis:       clang-10 crashes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 10 11:05:00 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.75
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 9.99.75 NetBSD 9.99.75 (WHOEVER) #350: Fri Nov 6 06:38:30 CET 2020 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/sparc64/compile/WHOEVER sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Since we are forced to use clang for pkgsrc/www/firefox (instead of the good
engouh and working well gcc in netbsd-current) I run into issues trying to
build firefox on sparc64:

[swgl 0.1.0] cargo:warning=Stack dump:
[swgl 0.1.0] cargo:warning=0.   Program arguments: /usr/pkg/bin/clang-10 -cc1 -triple sparc64-unknown-netbsd9.99 -S -disable-free -disable-llvm-verifier -discard-value-names -main-file-name gl.cc -mrelocation-model pic -pic-level 2 -mthread-model posix -mframe-pointer=none -relaxed-aliasing -fno-rounding-math -no-integrated-as -mconstructor-aliases -munwind-tables -mfloat-abi hard -dwarf-column-info -fno-split-dwarf-inlining -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -ffunction-sections -fdata-sections -resource-dir /usr/pkg/lib/clang/10.0.1 -include /usr/pkgobj/www/firefox/work/firefox-82.0.2/config/gcc_hidden.h -include /usr/pkgobj/www/firefox/work/build/mozilla-config.h -I /usr/pkgobj/www/firefox/work/build/dist/stl_wrappers -I /usr/pkgobj/www/firefox/work/build/dist/system_wrappers -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -D NDEBUG=1 -D TRIMMED=1 -I /usr/pkgobj/www/firefox/work/firefox-82.0.2/toolkit/library/rust -I /usr/pkgobj/www/firefox/work/build/toolkit/li
 brary/rust -I /usr/pkgobj/www/firefox/work/build/dist/include -I /usr/pkgobj/www/firefox/work/.buildlink/include/nspr -I /usr/pkgobj/www/firefox/work/.buildlink/include/nss -I /usr/pkgobj/www/firefox/work/build/dist/include/nss -I /usr/pkgobj/www/firefox/work/.x11-buildlink/include/pixman-1 -I /usr/pkgobj/www/firefox/work/.buildlink/include -D PIC -D MOZILLA_CLIENT -D PNG_NO_ASSEMBLER_CODE -I /usr/pkgobj/www/firefox/work/.buildlink/include/nss/nss -I /usr/pkgobj/www/firefox/work/.x11-buildlink/include -I /usr/pkgobj/www/firefox/work/.buildlink/include/libdrm -I /usr/pkgobj/www/firefox/work/.buildlink/include/glib-2.0 -I /usr/pkgobj/www/firefox/work/.buildlink/include/gio-unix-2.0 -I /usr/pkgobj/www/firefox/work/.buildlink/lib/glib-2.0/include -I /usr/pkgobj/www/firefox/work/.buildlink/include/ffmpeg4 -I /usr/pkgobj/www/firefox/work/.x11-buildlink/include/freetype2 -I /usr/pkgobj/www/firefox/work/.buildlink/include/harfbuzz -D _GLIBCXX_INCLUDE_NEXT_C_HEADERS -D _FORTIFY_SOURCE=2 -D u
 nix -D MOZILLA_CONFIG_H -I /usr/pkgobj/www/firefox/work/firefox-82.0.2/gfx/wr/webrender/res -I src -I /usr/pkgobj/www/firefox/work/build/sparc64-unknown-netbsd/release/build/swgl-2a769e3b252065cb/out -U MOZILLA_CONFIG_H -D _GLIBCXX_USE_CXX11_ABI=0 -internal-isystem /usr/include/g++ -internal-isystem /usr/include/g++/ -internal-isystem /usr/include/g++/backward -Og -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-de
 lete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Werror=implicit-function-declaration -Wno-unknown-warning-option -std=c++14 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /usr/pkgobj/www/firefox/work/firefox-82.0.2/gfx/wr/swgl -ferror-limit 19 -fmessage-length 0 -pthread -stack-protector 1 -fno-rtti -fgnuc-version=4.2.1 -fobjc-runtime=gnustep -fno-aligned-allocation -fdiagnostics-show-option -o /tmp/gl-be265b.s -x c++ src/gl.cc 
[swgl 0.1.0] cargo:warning=1.   <eof> parser at end of file
[swgl 0.1.0] cargo:warning=2.   Code generation
[swgl 0.1.0] cargo:warning=3.   Running pass 'Function Pass Manager' on module 'src/gl.cc'.
[swgl 0.1.0] cargo:warning=4.   Running pass 'SPARC DAG->DAG Pattern Instruction Selection' on function '@_ZL9pack_spanIN4glsl11vec4_scalarEEDv16_hPjRKT_'
[swgl 0.1.0] cargo:warning=#0 0x00000000440aa3e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/pkg/lib/libLLVM-10.so+0x7aa3e8)
[swgl 0.1.0] cargo:warning=#1 0x00000000440a7e54 llvm::sys::RunSignalHandlers() (/usr/pkg/lib/libLLVM-10.so+0x7a7e54)
[swgl 0.1.0] cargo:warning=#2 0x00000000440a8a20 SignalHandler(int) (/usr/pkg/lib/libLLVM-10.so+0x7a8a20)
[swgl 0.1.0] cargo:warning=clang-10: error: unable to execute command: Segmentation fault (core dumped)
[swgl 0.1.0] cargo:warning=clang-10: error: clang frontend command failed due to signal (use -v to see invocation)
[swgl 0.1.0] cargo:warning=clang version 10.0.1 
[swgl 0.1.0] cargo:warning=Target: sparc64-unknown-netbsd9.99
[swgl 0.1.0] cargo:warning=Thread model: posix
[swgl 0.1.0] cargo:warning=InstalledDir: /usr/pkg/bin
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: PLEASE submit a bug report to  and include the crash backtrace, preprocessed source, and associated run script.
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: 
[swgl 0.1.0] cargo:warning=********************
[swgl 0.1.0] cargo:warning=
[swgl 0.1.0] cargo:warning=PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
[swgl 0.1.0] cargo:warning=Preprocessed source(s) and associated run script(s) are located at:
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: /tmp/gl-b5701c.cpp
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: /tmp/gl-b5701c.sh
[swgl 0.1.0] cargo:warning=clang-10: note: diagnostic msg: 
[swgl 0.1.0] cargo:warning=
[swgl 0.1.0] cargo:warning=********************
[swgl 0.1.0] exit code: -2
[swgl 0.1.0] 
[swgl 0.1.0] 


Core was generated by `clang-10'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000044813548 in llvm::ScheduleDAGSDNodes::AddSchedEdges() ()
   from /usr/pkg/lib/libLLVM-10.so
(gdb) bt
#0  0x0000000044813548 in llvm::ScheduleDAGSDNodes::AddSchedEdges() ()
   from /usr/pkg/lib/libLLVM-10.so
#1  0x0000000044811a34 in (anonymous namespace)::ScheduleDAGRRList::Schedule()
    () from /usr/pkg/lib/libLLVM-10.so
#2  0x0000000044813098 in llvm::ScheduleDAGSDNodes::Run(llvm::SelectionDAG*, llvm::MachineBasicBlock*) () from /usr/pkg/lib/libLLVM-10.so
#3  0x00000000448d1410 in llvm::SelectionDAGISel::CodeGenAndEmitDAG() ()
   from /usr/pkg/lib/libLLVM-10.so
#4  0x00000000448d5414 in llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) () from /usr/pkg/lib/libLLVM-10.so
#5  0x00000000448d88f4 in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) [clone .part.0] () from /usr/pkg/lib/libLLVM-10.so
#6  0x0000000044404fcc in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) [clone .part.0] () from /usr/pkg/lib/libLLVM-10.so
#7  0x00000000441d40f4 in llvm::FPPassManager::runOnFunction(llvm::Function&)
    () from /usr/pkg/lib/libLLVM-10.so
#8  0x00000000441d4ff0 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
   from /usr/pkg/lib/libLLVM-10.so
#9  0x00000000441d5368 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
   from /usr/pkg/lib/libLLVM-10.so
#10 0x0000000041e872d4 in clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, ce<llvm::raw_pwrite_stream> >) () from /usr/pkg/lib/libclang-cpp.so.10
#11 0x000000004219400c in clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) () from /usr/pkg/lib/libclang-cpp.so.10
#12 0x0000000040f90e5c in clang::ParseAST(clang::Sema&, bool, bool) ()
   from /usr/pkg/lib/libclang-cpp.so.10
#13 0x0000000042a07ee0 in clang::FrontendAction::Execute() ()
   from /usr/pkg/lib/libclang-cpp.so.10
#14 0x00000000429c0218 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) () from /usr/pkg/lib/libclang-cpp.so.10
#15 0x0000000042a958f0 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) () from /usr/pkg/lib/libclang-cpp.so.10
#16 0x0000000000111e30 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) ()
#17 0x000000000010fcdc in ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
    ()
#18 0x000000000010da84 in main ()
(gdb) x/i $pc
=> 0x44813548 <_ZN4llvm18ScheduleDAGSDNodes13AddSchedEdgesEv+1192>:     
    ldx  [ %o0 ], %g1

and %o0 is NULL.

Will attach diag message/reproducer script to the PR later.

>How-To-Repeat:
Try to build firefox on sparc64.

>Fix:
Get rid of the pkgsrc clang dependency for this pkg.



Home | Main Index | Thread Index | Old Index