[Bug libstdc++/26094] New: Segmentation fault in Linux 7.1 GCC 3.1 Kernel 2.4.9-45lxset34smp
Hi ALL, Machine A : Linux 7.1 GCC 3.1 Kernel 2.4.9-45lxset34smp Machine B : Linux 7.1 GCC 3.1 Kernel 2.4.2-2 The following piece of code when run and compiled in Linux7.1 Machine A, runs fine, also compiled and run in Machine B, runs fine. But when the code is compiled in Machine A and run in Machine B, it crashes with segmentation fault: --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++ int main () { ifstream is; is.open ("test.txt"); if ( (is.rdstate() & ifstream::failbit ) != 0 ) printf( "Error opening 'test.txt'\n"); return 0; } Any IDEAS?? Rgds, LearningAllTheTime -- Summary: Segmentation fault in Linux 7.1 GCC 3.1 Kernel 2.4.9- 45lxset34smp Product: gcc Version: 3.1 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mahek2k1 at yahoo dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26094
[Bug libstdc++/26094] Segmentation fault in Linux 7.1 GCC 3.1 Kernel 2.4.9-45lxset34smp
--- Comment #3 from mahek2k1 at yahoo dot com 2006-02-06 21:05 --- (In reply to comment #2) > Please try with Linux and gcc that are still supported. Thanks for the inputs, sorry for making it confusing, the linux is Redhat 7.1 Additional info GDB Stack trace is following: (gdb) run Starting program: tryrdstategrid.2 Error opening 'test.txt' Program received signal SIGSEGV, Segmentation fault. 0x in ?? () (gdb) backtrace #0 0x in ?? () #1 0x4011e6f0 in __libc_start_main ( main=0x400ad648 > >+8>, argc=0, ubp_av=0x400ad1e8, init=0, fini=0, rtld_fini=0, stack_end=0x0) at ../sysdeps/generic/libc-start.c:129 Previous frame inner to this frame (corrupt stack?) (gdb) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26094