This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug fortran/11354] New: error in evaluating variable length fortran strings causes stalls
- From: "stephan dot kramer at imperial dot ac dot uk" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 7 Mar 2010 22:06:22 -0000
- Subject: [Bug fortran/11354] New: error in evaluating variable length fortran strings causes stalls
- Reply-to: sourceware-bugzilla at sourceware dot org
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.