DragonFly BSD
DragonFly bugs List (threaded) for 2013-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[DragonFlyBSD - Bug #2478] GCC47 and simple C++ program


From: John Marino via Redmine <bugtracker-admin@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Jan 2013 15:05:50 -0800

Issue #2478 has been updated by marino.


This might be the source of the problem:
/usr/include/c++/4.7/bits/istream.tcc
----------------------------------------
Bug #2478: GCC47 and simple C++ program
http://bugs.dragonflybsd.org/issues/2478

Author: yellowrabbit2010
Status: New
Priority: Normal
Assignee: dragonflybsd1
Category: 
Target version: 


Fresh installed DragogonFlyBSD 3.2.2 (http://mirror-master.dragonflybsd.org/iso-images/dfly-x86_64-3.2.2_REL.iso.bz2).

Simple C++ file:
==== test.c++ ====
#include <iostream>

using namespace std;

int
main(int argc, char *argv[])
{
        int r;


        cin >> r;
        return(r);
}
====

Build and run with default compiler:
dfly322# g++ -g -o test44 test.c++
dfly322# ./test44
12

Build and run with GCC47:
dfly322# env CCVER=gcc47 g++ -g -o test47 test.c++
dfly322# ./test47
12
Segmentation fault (core dumped)

Cal trace:
dfly322# gdb test47 -c test47.core
GNU gdb (GDB) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-dragonfly".
For bug reporting instructions, please see:
<http://bugs.dragonflybsd.org/>...
Reading symbols from /root/var/test-c++/test47...done.
[New <main task>]
Core was generated by `test47'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000008008be3db in std::istream::sentry::sentry(std::istream&, bool) ()
   from /usr/lib/gcc47/libstdc++.so.9
(gdb) bt
#0  0x00000008008be3db in std::istream::sentry::sentry(std::istream&, bool) ()
   from /usr/lib/gcc47/libstdc++.so.9
#1  0x00000008008bf48e in std::istream::operator>>(int&) ()
   from /usr/lib/gcc47/libstdc++.so.9
#2  0x0000000000400e20 in main (argc=1, argv=0x7ffffffff990) at test.c++:10
(gdb) q
 


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



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