Bug 811751 - clang segfaults with -std=c++0x
clang segfaults with -std=c++0x
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: llvm (Show other bugs)
16
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michel Alexandre Salim
Fedora Extras Quality Assurance
abrt_hash:6405082ae59862fafcfc83dc002...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-11 17:39 EDT by James
Modified: 2013-01-16 17:16 EST (History)
4 users (show)

See Also:
Fixed In Version: clang-3.1-12.fc18.x86_64
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-16 17:16:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: maps (6.33 KB, text/plain)
2012-04-11 17:39 EDT, James
no flags Details
File: backtrace (17.98 KB, text/plain)
2012-04-11 17:39 EDT, James
no flags Details

  None (edit)
Description James 2012-04-11 17:39:35 EDT
libreport version: 2.0.8
abrt_version:   2.0.7
backtrace_rating: 3
cmdline:        /usr/bin/clang -cc1 -triple x86_64-redhat-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name foo.cpp -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.21.53.0.1 -momit-leaf-frame-pointer -resource-dir /usr/bin/../lib/clang/2.9 -std=c++0x -ferror-limit 19 -fmessage-length 80 -fcxx-exceptions -fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o foo.o -x c++ foo.cpp
crash_function: clang::Sema::CheckConstructor(clang::CXXConstructorDecl*)
executable:     /usr/bin/clang
kernel:         3.3.1-3.fc16.x86_64
pid:            5098
pwd:            /home/james/src/exercises/optim2
reason:         Process /usr/bin/clang was killed by signal 11 (SIGSEGV)
time:           Wed 11 Apr 2012 22:32:46 BST
uid:            1000
username:       james

backtrace:      Text file, 18407 bytes
maps:           Text file, 6480 bytes

build_ids:
:e3c88cb9ea428bd61f4064dbd53acae2d396a1ec
:638db099ff5fb986d1a092629d1bb1dca5be4904
:455ba5e1f9bfbe95b5d751aade0fe830576d21c6
:6346b4396d6f9269e2b4dfab799fd4d57aa2b186
:dacf32a9a2f2b5077ba944e7b835cca6f637f78f
:b9d3a4213a482d034bebc7dc1ed2901a734a894d
:0f0c9eed63ed279ceb0aef109eff8bcbb351e4bb
:1a212c7f1515542b310ba92f6109efc9b5bf2b6e
:75eaece6e0d1e075520cdfad5c398fdab4370846
:3ba5302e34546a45e9a85ac3429e7bc6ed624011

comment:
:Crashed while attempting to compile:
:
:  #include <iostream>
:  using namespace std;
:  int main() {
:    cout << "Hello world!" << endl;
:  }
:
:with the -std=c++0x option. Without the -std option, it works fine.

dso_list:
:/lib64/libm-2.14.90.so glibc-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165593
:/usr/include/libio.h glibc-headers-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165622
:/usr/include/c++/4.6.3/x86_64-redhat-linux/bits/c++config.h libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/usr/include/unistd.h glibc-headers-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165622
:/usr/lib64/llvm/libLLVM-2.9.so llvm-libs-2.9-10.fc16.x86_64 (Fedora Project) 1333821151
:/usr/lib64/libffi.so.5.0.10 libffi-3.0.10-1.fc16.x86_64 (Fedora Project) 1320287305
:/usr/include/c++/4.6.3/bits/stl_function.h libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/usr/include/c++/4.6.3/bits/locale_classes.h libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/usr/include/c++/4.6.3/type_traits libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/lib64/libpthread-2.14.90.so glibc-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165593
:/usr/bin/clang clang-2.9-10.fc16.x86_64 (Fedora Project) 1334174177
:/usr/include/stdlib.h glibc-headers-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165622
:/usr/include/c++/4.6.3/ostream libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/usr/lib/clang/2.9/include/stdint.h clang-2.9-10.fc16.x86_64 (Fedora Project) 1334174177
:/lib64/libdl-2.14.90.so glibc-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165593
:/usr/include/pthread.h glibc-headers-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165622
:/usr/include/c++/4.6.3/bits/stl_algobase.h libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/usr/include/c++/4.6.3/x86_64-redhat-linux/bits/gthr-default.h libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/lib64/libc-2.14.90.so glibc-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165593
:/usr/include/c++/4.6.3/bits/ios_base.h libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/usr/include/c++/4.6.3/bits/char_traits.h libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/lib64/libgcc_s-4.6.3-20120306.so.1 libgcc-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500169
:/usr/include/c++/4.6.3/bits/stl_iterator.h libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264
:/lib64/ld-2.14.90.so glibc-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165593
:/usr/include/bits/confname.h glibc-headers-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165622
:/usr/lib64/libstdc++.so.6.0.16 libstdc++-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500185
:/usr/include/stdio.h glibc-headers-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165622
:/usr/include/wchar.h glibc-headers-2.14.90-24.fc16.6.x86_64 (Fedora Project) 1330165622
:/usr/include/c++/4.6.3/bits/basic_string.h libstdc++-devel-4.6.3-2.fc16.x86_64 (Fedora Project) 1332500264

environ:
:XDG_VTNR=2
:MANPATH=/home/james/local/share/man:
:'LDFLAGS=-L/home/james/local/lib '
:XDG_SESSION_ID=101
:LC_MONETARY=en_GB.utf8
:HOSTNAME=rhapsody
:IMSETTINGS_INTEGRATE_DESKTOP=yes
:GPG_AGENT_INFO=/tmp/keyring-bnWolg/gpg:0:1
:TERM=xterm
:SHELL=/bin/bash
:XDG_SESSION_COOKIE=178724fed3119c7237eda6a30000000d-1334148275.69241-709322629
:HISTSIZE=1000
:GJS_DEBUG_OUTPUT=stderr
:WINDOWID=50331653
:LC_NUMERIC=en_GB.utf8
:OLDPWD=/home/james/src/exercises
:QTDIR=/usr/lib64/qt-3.3
:GNOME_KEYRING_CONTROL=/tmp/keyring-bnWolg
:QTINC=/usr/lib64/qt-3.3/include
:'GJS_DEBUG_TOPICS=JS ERROR;JS LOG'
:IMSETTINGS_MODULE=none
:USER=james
:LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:*.pdf=00;33:*.ps=00;33:*.ps.gz=00;33:*.txt=00;33:*.patch=00;33:*.diff=00;33:*.log=00;33:*.tex=00;33:*.xls=00;33:*.xlsx=00;33:*.ppt=00;33:*.pptx=00;33:*.rtf=00;33:*.doc=00;33:*.docx=00;33:*.odt=00;33:*.ods=00;33:*.odp=00;33:*.xml=00;33:*.epub=00;33:*.abw=00;33:*.html=00;33:*.wpd=00;33:
:LD_LIBRARY_PATH=/home/james/local/lib:
:CPATH=/home/james/local/include:
:SSH_AUTH_SOCK=/tmp/keyring-bnWolg/ssh
:USERNAME=james
:SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/20765,unix/unix:/tmp/.ICE-unix/20765
:DESKTOP_SESSION=gnome
:MAIL=/var/spool/mail/james
:PATH=/home/james/local/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
:QT_IM_MODULE=xim
:PWD=/home/james/src/exercises/optim2
:XMODIFIERS=@im=none
:GNOME_KEYRING_PID=20759
:LANG=en_GB.utf8
:KDE_IS_PRELINKED=1
:GDM_LANG=en_GB.utf8
:MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles
:LOADEDMODULES=
:KDEDIRS=/usr
:LC_MEASUREMENT=en_GB.utf8
:SANE_NET_HOSTS=gyro.ettle.lan:
:'PS1=[\\u@\\[\\033[1;34m\\]\\h\\[\\033[0m\\] \\W]\\$ '
:GDMSESSION=gnome
:HISTCONTROL=ignoredups
:SHLVL=2
:HOME=/home/james
:XDG_SEAT=seat0
:'CFLAGS=-I/home/james/local/include '
:GNOME_DESKTOP_SESSION_ID=this-is-deprecated
:LOGNAME=james
:QTLIB=/usr/lib64/qt-3.3/lib
:DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-f0NKRB38jV,guid=c0fa1e74a0dff70b0e3ae8b70003be55
:CLASSPATH=:/home/james/src/java
:MODULESHOME=/usr/share/Modules
:PKG_CONFIG_PATH=/home/james/local/lib/pkgconfig:
:'LESSOPEN=||/usr/bin/lesspipe.sh %s'
:WINDOWPATH=2
:XDG_RUNTIME_DIR=/run/user/james
:DISPLAY=:0
:LC_TIME=en_GB.utf8
:XAUTHORITY=/var/run/gdm/auth-for-james-L5fi0o/database
:COLORTERM=gnome-terminal
:'module=() {  eval `/usr/bin/modulecmd bash $*`\n}'
:_=/usr/bin/clang++

var_log_messages:
:Apr 11 20:56:20 rhapsody yum[2000]: Installed: clang-2.9-10.fc16.x86_64
:Apr 11 20:59:28 rhapsody kernel: [271427.245930] clang[2223]: segfault at 8 ip 000000000082b9a7 sp 00007fff9901b160 error 4 in clang[400000+95e000]
:Apr 11 20:59:29 rhapsody abrt[2224]: Saved core dump of pid 2223 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-20:59:28-2223 (9568256 bytes)
:Apr 11 20:59:47 rhapsody kernel: [271445.828195] clang[2259]: segfault at 8 ip 000000000082b9a7 sp 00007fff32f1a6b0 error 4 in clang[400000+95e000]
:Apr 11 20:59:47 rhapsody abrt[2260]: Not dumping repeating crash in '/usr/bin/clang'
:Apr 11 21:01:50 rhapsody kernel: [271568.948673] clang[2355]: segfault at 8 ip 000000000082b9a7 sp 00007ffffb3df610 error 4 in clang[400000+95e000]
:Apr 11 21:01:51 rhapsody abrt[2356]: Saved core dump of pid 2355 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-21:01:50-2355 (9568256 bytes)
:Apr 11 21:02:13 rhapsody kernel: [271592.298410] clang[2386]: segfault at 8 ip 000000000082b9a7 sp 00007fff73dce700 error 4 in clang[400000+95e000]
:Apr 11 21:02:14 rhapsody abrt[2387]: Saved core dump of pid 2386 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-21:02:13-2386 (9568256 bytes)
:Apr 11 21:02:57 rhapsody kernel: [271636.377347] clang[2429]: segfault at 8 ip 000000000082b9a7 sp 00007fffaec73640 error 4 in clang[400000+95e000]
:Apr 11 21:02:58 rhapsody abrt[2430]: Saved core dump of pid 2429 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-21:02:57-2429 (9568256 bytes)
:Apr 11 21:03:54 rhapsody kernel: [271692.992923] clang[2491]: segfault at 8 ip 000000000082b9a7 sp 00007fff508d58e0 error 4 in clang[400000+95e000]
:Apr 11 21:03:55 rhapsody abrt[2492]: Saved core dump of pid 2491 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-21:03:54-2491 (9568256 bytes)
:Apr 11 22:27:38 rhapsody kernel: [276716.962320] clang[4820]: segfault at 8 ip 000000000082b9a7 sp 00007fffdacf4400 error 4 in clang[400000+95e000]
:Apr 11 22:27:39 rhapsody abrt[4821]: Saved core dump of pid 4820 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-22:27:38-4820 (9568256 bytes)
:Apr 11 22:28:55 rhapsody kernel: [276794.016378] clang[4895]: segfault at 8 ip 000000000082b9a7 sp 00007fff59878140 error 4 in clang[400000+95e000]
:Apr 11 22:28:56 rhapsody abrt[4896]: Saved core dump of pid 4895 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-22:28:55-4895 (9568256 bytes)
:Apr 11 22:31:13 rhapsody kernel: [276932.145849] clang[4983]: segfault at 8 ip 000000000082b9a7 sp 00007fff06d2aa00 error 4 in clang[400000+95e000]
:Apr 11 22:31:14 rhapsody abrt[4984]: Saved core dump of pid 4983 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-22:31:13-4983 (9568256 bytes)
:Apr 11 22:32:24 rhapsody kernel: [277003.095272] clang[5056]: segfault at 8 ip 000000000082b9a7 sp 00007ffff0da2ff0 error 4 in clang[400000+95e000]
:Apr 11 22:32:25 rhapsody abrt[5057]: Saved core dump of pid 5056 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-22:32:24-5056 (9605120 bytes)
:Apr 11 22:32:46 rhapsody kernel: [277025.522950] clang[5098]: segfault at 8 ip 000000000082b9a7 sp 00007fffb5e144e0 error 4 in clang[400000+95e000]
:Apr 11 22:32:47 rhapsody abrt[5099]: Saved core dump of pid 5098 (/usr/bin/clang) to /var/spool/abrt/ccpp-2012-04-11-22:32:46-5098 (9605120 bytes)
Comment 1 James 2012-04-11 17:39:39 EDT
Created attachment 576893 [details]
File: maps
Comment 2 James 2012-04-11 17:39:41 EDT
Created attachment 576894 [details]
File: backtrace
Comment 3 James 2012-05-08 18:48:31 EDT
Unable to test this in F17 with clang-3.0-12.fc17.x86_64, since it won't build the basic C++ "Hello world" program:


$ clang++ helloworld.cpp -std=c++0x
In file included from helloworld.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/ostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h:40:
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h:48:45: error: 
      use of undeclared identifier '__ATOMIC_ACQ_REL'
  { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                            ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h:52:38: error: 
      use of undeclared identifier '__ATOMIC_ACQ_REL'
  { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                     ^
2 errors generated.
Comment 4 Fedora End Of Life 2013-01-16 10:51:59 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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