ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Segfaults in ddd


From: Fred Krogh
Subject: Re: Segfaults in ddd
Date: Thu, 11 May 2006 07:56:37 -0700
User-agent: Thunderbird 1.5.0.2 (X11/20060430)

Hi Andrew --

I just switched from digest mode so have not actually received your
report, but did see it in the mailing list archives.  Your experience is
the same as mine as far as printing is concerned.  I complained about
the mouse pointer doing similar damage as it is the one that keeps
hitting me.  I've learned to avoid printing dummy arrays, but avoiding
them with the mouse pointer takes a level of attention that I lose
particularly when all my thought is on trying to understand what stupid
mistake I've made THIS time.

I've just tried the "p *ii" from gdb directly.  And get this message

utils.c:947: internal-error: virtual memory exhausted: can't allocate
4294967420 bytes.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

I also tried this with "II(*)" replaced with "II(5)" in the integer
statement.  With this done both gdb and ddd have no problems.  (Note in
Fortran the "*" dimension is a way to tell the compiler that the
dimension here is whatever the program that calls this one has assigned.)

So I've been unfairly blaming ddd for a gdb problem since when in
desperation I've gone back to using gdb directly it has been solid.

I suppose the real solution is for gdb to walk up the call stack and
find the actual dimension of a Fortran dummy array declared with a "*"
dimension and then do what it would do if the actual dimension were
declared explicitly.  I'd be happy to pass this on to the gdb people,
but suspect it would mean more coming from you as the maintainer of
ddd.  (This is a bit tricky as the calling program may be passing in
offset from the arrays starting point and thus this offset would need to
be subtracted from the original dimension.  And even that is not perfect
since some Fortran subprograms will take a work array and divide it up
into sections based on some input, say N, and thus those sections would
all have logical dimension N as far as the logic of the program is
concerned.  I would not expect gdb or any other program to figure out this.)

A temporary solution for ddd might be to notice that the mouse pointer
is over something potentially dangerous and not pass anything on to gdb
if the item in question is a dummy array declared with "*".  I suspect
this is difficult to do.

Let me know if would like me to post a comment to the gdb people.

Many thanks for looking into this, and for your work in maintaining ddd,
Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]