public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/26124] New: Segmentation fault in constructor of std::ostream::sentry::sentry
@ 2006-02-06 12:50 broeni at osb-systems dot com
2006-02-06 12:51 ` [Bug libstdc++/26124] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: broeni at osb-systems dot com @ 2006-02-06 12:50 UTC (permalink / raw)
To: gcc-bugs
When compiled with:
g++-4.0 -g -Wall -c -o try.o try.cc
g++-4.0 -g -Wall -c -o foo.o foo.cc
g++-4.0 -g -Wall -o try try.o foo.o
the program below creates a segmentation fault.
UNIX> gdb ./try
(gdb) r
Starting program: /data/home/osb/temp/clcpp/try
Program received signal SIGSEGV, Segmentation fault.
0xb7f83de5 in std::ostream::sentry::sentry () from /usr/lib/libstdc++.so.6
try.h
=====
#ifndef TRY_H
#define TRY_H
int mkCint();
const int cInt = mkCint();
#endif
try.cc
======
#include "try.h"
#include <iostream>
int main()
{
std::cout << cInt << std::endl;
}
int mkCint()
{
std::cout << "mkCint()" << std::endl;
return 2;
}
foo.cc
======
#include "try.h"
Notes
If stdout instead of std::cout is used OR
if compiled with g++-3.3 the program runs as expected:
UNIX> ./try
mkCint()
mkCint()
2
UNIX>
--
Summary: Segmentation fault in constructor of
std::ostream::sentry::sentry
Product: gcc
Version: 4.0.3
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: broeni at osb-systems dot com
GCC build triplet: i486-pc-linux-gnu
GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26124
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libstdc++/26124] Segmentation fault in constructor of std::ostream::sentry::sentry
2006-02-06 12:50 [Bug libstdc++/26124] New: Segmentation fault in constructor of std::ostream::sentry::sentry broeni at osb-systems dot com
@ 2006-02-06 12:51 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-06 12:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-06 12:51 -------
*** This bug has been marked as a duplicate of 26123 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26124
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-06 12:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-06 12:50 [Bug libstdc++/26124] New: Segmentation fault in constructor of std::ostream::sentry::sentry broeni at osb-systems dot com
2006-02-06 12:51 ` [Bug libstdc++/26124] " pinskia 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).