From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4639 invoked by alias); 7 Mar 2010 22:06:23 -0000 Received: (qmail 4624 invoked by uid 48); 7 Mar 2010 22:06:22 -0000 Date: Sun, 07 Mar 2010 22:06:00 -0000 From: "stephan dot kramer at imperial dot ac dot uk" To: gdb-prs@sourceware.org Message-ID: <20100307220622.11354.stephan.kramer@imperial.ac.uk> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug fortran/11354] New: error in evaluating variable length fortran strings causes stalls X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2010-q1/txt/msg00391.txt.bz2 The below simple test program was compiled with gfortran 4.4.1, -g. After putting a breakpoint on the print line, the displayed frame looks as follows: Breakpoint 1, print_string (string=Cannot access memory at address 0x80487eb ) at string.f90:11 I don't mind so much the string not being printed correctly (lots of things in fortran aren't), but in particular for big executables this seems to cause huge waiting times for the frame to be printed out (several minutes). This makes gdb 7.0 and 7.1 currently unusable for our project. After a digging a little deeper, the cause seems to be the length of the string not being picked up correctly from stack. Putting a breakpoint on valops.c (cvs 1.237 of the gdb_7_1-branch) on line 942 value_fetch_lazy(), the length of the value it tries to read is some random big number. It then tries to read this from the debugged process memory, and fails reaching the end which takes quite a while for a large process. The sample program: program main implicit none call print_string("hello world") contains subroutine print_string(string) character(len=*):: string print *, string end subroutine print_string end program main -- Summary: error in evaluating variable length fortran strings causes stalls Product: gdb Version: 7.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at sourceware dot org ReportedBy: stephan dot kramer at imperial dot ac dot uk CC: gdb-prs at sourceware dot org http://sourceware.org/bugzilla/show_bug.cgi?id=11354 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.