public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/17200] New: Reading from a istrstream seg faults when using -malign-double flag
@ 2004-08-26 11:55 peter dot hedinger at st dot com
  2004-08-26 12:13 ` [Bug libstdc++/17200] " pcarlini at suse dot de
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: peter dot hedinger at st dot com @ 2004-08-26 11:55 UTC (permalink / raw)
  To: gcc-bugs

>g++ -v
Reading specs from /pd/gcc/2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)

--------------------------- test.cpp ------------------------
#include <iostream>
#include <strstream>
using namespace std;

int main( ) 
{
    char *tmp = "This is a test";
    char tag[100];
    tag[0] = '\0';
    
    istrstream inputStream((const char*)tmp);
    inputStream >> tag;
    cout << tag << endl;
}
-------------------------------- Works ------------------------
> g++ test.cpp
> ./a.out
This
-------------------------------- Crashes ----------------------
> g++ -malign-double test.cpp
> ./a.out
Segmentation fault
-------------------------------- Cause ------------------------
The bit that causes the seg fault is "inputStream >> tag;"

-- 
           Summary: Reading from a istrstream seg faults when using -malign-
                    double flag
           Product: gcc
           Version: 2.95.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: peter dot hedinger at st dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: Linux hicks 2.4.7-10custom #4 SMP Thu Nov 28 16:10:26
                    GMT 2002 i


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17200


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/17200] Reading from a istrstream seg faults when using -malign-double flag
  2004-08-26 11:55 [Bug libstdc++/17200] New: Reading from a istrstream seg faults when using -malign-double flag peter dot hedinger at st dot com
@ 2004-08-26 12:13 ` pcarlini at suse dot de
  2004-08-26 12:41 ` reichelt at gcc dot gnu dot org
  2004-08-26 12:41 ` reichelt at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pcarlini at suse dot de @ 2004-08-26 12:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-08-26 12:12 -------
The problem cannot be reproduce with gcc3.3.x and gcc3.4.1. Gcc 2.95.2 is *very*
old and no longer maintained, please consider updating your tools.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17200


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/17200] Reading from a istrstream seg faults when using -malign-double flag
  2004-08-26 11:55 [Bug libstdc++/17200] New: Reading from a istrstream seg faults when using -malign-double flag peter dot hedinger at st dot com
  2004-08-26 12:13 ` [Bug libstdc++/17200] " pcarlini at suse dot de
  2004-08-26 12:41 ` reichelt at gcc dot gnu dot org
@ 2004-08-26 12:41 ` reichelt at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-26 12:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-08-26 12:41 -------
Reopen ...

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
   GCC host triplet|Linux hicks 2.4.7-10custom  |i686-pc-linux-gnu
                   |#4 SMP Thu Nov 28 16:10:26  |
                   |GMT 2002 i                  |
         Resolution|WONTFIX                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17200


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/17200] Reading from a istrstream seg faults when using -malign-double flag
  2004-08-26 11:55 [Bug libstdc++/17200] New: Reading from a istrstream seg faults when using -malign-double flag peter dot hedinger at st dot com
  2004-08-26 12:13 ` [Bug libstdc++/17200] " pcarlini at suse dot de
@ 2004-08-26 12:41 ` reichelt at gcc dot gnu dot org
  2004-08-26 12:41 ` reichelt at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-26 12:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-08-26 12:41 -------
... to close as fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.0.x


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17200


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-08-26 12:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-26 11:55 [Bug libstdc++/17200] New: Reading from a istrstream seg faults when using -malign-double flag peter dot hedinger at st dot com
2004-08-26 12:13 ` [Bug libstdc++/17200] " pcarlini at suse dot de
2004-08-26 12:41 ` reichelt at gcc dot gnu dot org
2004-08-26 12:41 ` reichelt at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).