From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7220 invoked by alias); 14 Jan 2010 10:28:01 -0000 Received: (qmail 7071 invoked by uid 48); 14 Jan 2010 10:27:41 -0000 Date: Thu, 14 Jan 2010 10:28:00 -0000 Subject: [Bug libfortran/42742] New: SIGSEGV at libgfortran/io/format.c:111 X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manfred99 at gmx dot ch" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg01670.txt.bz2 In a larger program of mine, I got a SIGSEGV when printing WRITE(*,fmtstr) & dat(1),"-",dat(2),"-",dat(3), & datedelim,dat(4),":",dat(5), & (delim,bufarr(pindx),pindx=1,anzarg2) with gfortran 4.5 (latest snapshot). Using gfortran 4.3.5 the code runs fine. Unfortunately, I can not reproduce the crash in a standalone program. In the above print statement, fmtstr is rather large (~550chars). Here is the gdb output: Program received signal SIGSEGV, Segmentation fault. reset_node (fn=0xc) at ../../../gfortran-source/gcc-4.5-20100107/libgfortran/io/format.c:111 111 if (fn->format != FMT_LPAREN) (gdb) where #0 reset_node (fn=0xc) at ../../../gfortran-source/gcc-4.5-20100107/libgfortran/io/format.c:111 #1 0x0000000000423b30 in reset_fnode_counters () at ../../../gfortran-source/gcc-4.5-20100107/libgfortran/io/format.c:134 #2 parse_format () at ../../../gfortran-source/gcc-4.5-20100107/libgfortran/io/format.c:1233 #3 0x0000000000418208 in data_transfer_init (dtp=0x7ffffffead80, read_flag=0) at ../../../gfortran-source/gcc-4.5-20100107/libgfortran/io/transfer.c:2182 #4 0x000000000040ba86 in writevals (startjul=, endjul=, reqts=, basets=, use_monthtu=, station=, param=, aggrtypes=, parfmt2=, valarr2=, datefmt=, delim=, missing=, anzarg2=, anzval=, toffset=, qualarr=, wantqf=, _station=, _param=, _aggrtypes=, _parfmt2=, _delim=, _missing=) at extractdata.f:1464 #5 0x0000000000407818 in extractdata () at extractdata.f:58 #6 0x0000000000407906 in main (argc=, argv=) at extractdata.f:1179 #7 0x000000000042b406 in __libc_start_main (main=, argc=, ubp_av=, init=0x42b8b0 <__libc_csu_init>, fini=0x42b870 <__libc_csu_fini>, rtld_fini=0, stack_end=0x7fffffffdf98) at libc-start.c:220 #8 0x0000000000400209 in _start () at ../sysdeps/x86_64/elf/start.S:113 (gdb) list 106 fnode *f; 107 108 fn->count = 0; 109 fn->current = NULL; 110 111 if (fn->format != FMT_LPAREN) 112 return; 113 114 for (f = fn->u.child; f; f = f->next) 115 { Hopefully this gives already some clues. Otherwise please tell me how to debug further. -- Summary: SIGSEGV at libgfortran/io/format.c:111 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: manfred99 at gmx dot ch http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42742