This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR15809 (PR19276) - ICE and segfault with au toma tic character, dummy pointer arrays


On Tue, Nov 29, 2005 at 05:52:53PM +0100, THOMAS Paul Richard 169137 wrote:
> > Actually, I'm not sure this is what we want to do. The problem is that
> > there's only 24 bits in the dtype for the length, so it breaks for
> > bigger character variables. There was some PR:s about this, and a
> > number of intrinsics as well as transfer_array were rewritten to take
> > an extra argument for the string length instead of using the
> > descriptor. Or perhaps I misunderstood what this part of the patch
> > does?
> 
> Within the procedure, there is a need for the size information for the array
> elements to be available to build the array descriptor dtype. This is needed
> in assignments of GFC_DESCRIPTOR_TYPE_Ps and their io, for example,
> otherwise segfaults occur.  The latter could be fixed, I guess, but I am not
> sure that I want to get into the former just yet.

I see. It seems that fixing this isn't entirely trivial.

> At some stage array representations will have to be reformed. How about I
> hang a TODO patch here?

Yes, that sounds right. 
 
> > And yes, the updated testcase you sent by private mail works correctly
> > on Linux.
> 
> Good.  I need to understand why the original worked on Cygwin. It should not
> have.

I suspect it's a question of the implementation of free() in the
respective C libraries. If glibc or the Tru64 libc detect an invalid
pointer, they stop the program, while cygwin happily continues?

> Subject to these corrections and comments, is the patch OK to go?

OK for trunk. If no regressions are reported against the patch within
24 hours, commit to 4.1 as well. With 4.1 drawing closer, I think we
should be careful about not introducing more regressions there.

-- 
Janne Blomqvist

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]