Bug 1692415 - crash on armv7hl
Summary: crash on armv7hl
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: clang
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Stellard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-25 14:44 UTC by Dave Love
Modified: 2019-07-29 15:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-29 15:40:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reduced test case (291 bytes, text/plain)
2019-03-28 17:14 UTC, Tom Stellard
no flags Details

Description Dave Love 2019-03-25 14:44:40 UTC
The scorep package is currently FTBFS on armv7hl in rawhide (but not f30) due to a crash in clang, as below.  This is from the scratch build https://koji.fedoraproject.org/koji/taskinfo?taskID=33762099
I'm updating the package, and will disable use of clang on arm, so to reproduce it, use scorep-4.1-5.fc31.src

/bin/sh ./libtool  --tag=CXX   --mode=compile /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../build-libwrap -I./../src  -I../../build-libwrap/../src -DLIBWRAP_BUILD -I../src/utils/include -I../../build-libwrap/../src/utils/include -I../../build-libwrap/../vendor/common/src/utils/include   -g -O2 -c -o libscorep_tools_la-scorep_tools_utils.lo `test -f '../src/tools/lib/scorep_tools_utils.cpp' || echo '../../build-libwrap/'`../src/tools/lib/scorep_tools_utils.cpp
libtool: compile:  /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../build-libwrap -I./../src -I../../build-libwrap/../src -DLIBWRAP_BUILD -I../src/utils/include -I../../build-libwrap/../src/utils/include -I../../build-libwrap/../vendor/common/src/utils/include -g -O2 -c ../../build-libwrap/../src/tools/lib/scorep_tools_utils.cpp  -fPIC -DPIC -o .libs/libscorep_tools_la-scorep_tools_utils.o
make[3]: Leaving directory '/builddir/build/BUILD/scorep-4.1/serial/build-libwrap'
Stack dump:
0.	Program arguments: /usr/bin/clang-8 -cc1 -triple armv7-unknown-linux-gnueabihf -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name scorep_tools_utils.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu generic -target-abi aapcs-linux -mfloat-abi hard -fallow-half-arguments-and-returns -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /builddir/build/BUILD/scorep-4.1/serial/build-libwrap/.libs/libscorep_tools_la-scorep_tools_utils.gcno -resource-dir /usr/lib/clang/8.0.0 -D HAVE_CONFIG_H -I . -I ../../build-libwrap -I ./../src -I ../../build-libwrap/../src -D LIBWRAP_BUILD -I ../src/utils/include -I ../../build-libwrap/../src/utils/include -I ../../build-libwrap/../vendor/common/src/utils/include -D PIC -internal-isystem /usr/bin/../lib/gcc/armv7hl-redhat-linux-gnueabi/9/../../../../include/c++/9 -internal-isystem /usr/bin/../lib/gcc/armv7hl-redhat-linux-gnueabi/9/../../../../include/c++/9/armv7hl-redhat-linux-gnueabi -internal-isystem /usr/bin/../lib/gcc/armv7hl-redhat-linux-gnueabi/9/../../../../include/c++/9/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib/clang/8.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -fdeprecated-macro -fdebug-compilation-dir /builddir/build/BUILD/scorep-4.1/serial/build-libwrap -ferror-limit 19 -fmessage-length 0 -fno-signed-char -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o .libs/libscorep_tools_la-scorep_tools_utils.o -x c++ ../../build-libwrap/../src/tools/lib/scorep_tools_utils.cpp -faddrsig 
1.	../../build-libwrap/../src/tools/lib/scorep_tools_utils.cpp:300:1: current parser token 'string'
2.	../../build-libwrap/../src/tools/lib/scorep_tools_utils.cpp:268:1: LLVM IR generation of declaration 'find_library'
3.	../../build-libwrap/../src/tools/lib/scorep_tools_utils.cpp:268:1: Generating code for declaration 'find_library'
4.	../../build-libwrap/../src/tools/lib/scorep_tools_utils.cpp:286:5: LLVM IR generation of compound statement ('{}')
clang-8: error: unable to execute command: Segmentation fault (core dumped)
clang-8: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 8.0.0 (Fedora 8.0.0-1.fc31)
Target: armv7l-unknown-linux-gnueabihf
Thread model: posix
InstalledDir: /usr/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to  and include the crash backtrace, preprocessed source, and associated run script.
clang-8: note: diagnostic msg: 
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /tmp/scorep_tools_utils-c81110.cpp
clang-8: note: diagnostic msg: /tmp/scorep_tools_utils-c81110.sh
clang-8: note: diagnostic msg: 
********************

Comment 1 Tom Stellard 2019-03-28 17:14:22 UTC
Created attachment 1549150 [details]
Reduced test case

Here is a reduced test case.  I can reproduce the crash with

clang++ reduced.cpp

Comment 2 serge_sans_paille 2019-03-29 08:39:38 UTC
Same platform, clang segfaults when trying to compile this code:

  using nullptr_t = void*;

  struct  exception_ptr
  {
    void* __ptr_;
    exception_ptr(nullptr_t) : __ptr_() {}
    ~exception_ptr() ;
    friend
      bool operator!=(const exception_ptr& __x, const exception_ptr& __y) ;

  };

  struct __assoc_sub_state
  {
    exception_ptr __exception_;
    unsigned __state_;

    bool __has_value() const
    {return (__state_ & 1) || (__exception_ != nullptr);}

    void set_value();
  };

  void
  __assoc_sub_state::set_value()
  {
    __has_value();
  }

Comment 3 Richard Shaw 2019-04-02 15:19:29 UTC
Also happening for me trying to build PySide2 (scratch build, not yet in Fedora proper)

Build log:
https://kojipkgs.fedoraproject.org//work/tasks/7227/33817227/build.log

Scratch build link:
https://koji.fedoraproject.org/koji/taskinfo?taskID=33817222

Comment 4 Tom Stellard 2019-04-16 17:13:46 UTC
We think this is fixed now with clang-8.0.0-2.fc31, can you try building again?

Comment 5 Dave Love 2019-07-29 15:40:19 UTC
Apologies that I never tried this again.  It is indeed fixed.


Note You need to log in before you can comment on or make changes to this bug.