Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: s-sumi@trc.rwcp.or.jp
To: Tom Browder <tbrowde@asi-fwb.com>
Cc: axp-list@redhat.com, linux-alpha@vger.rutgers.edu
Subject: Re: sqrt FPE's and fclose errors
Date: Fri, 20 Mar 1998 00:53:53 +0900	[thread overview]
Message-ID: <199803191553.AAA18237@pdss9.trc.rwcp.or.jp> (raw)
In-Reply-To: Your message of Thu, 19 Mar 1998 08:48:04 -0600. <Pine.LNX.3.95.980319084306.1580A-100000@tomtom.asi-fwb.com>

Hi. 

>>>>> "Tom" == Tom Browder <tbrowde@asi-fwb.com> writes:
Tom> On a DEC alpha with RH 5.0, I get a segv
Tom> using fclose.

Tom> This is the simplest prog which causes the segv:

Tom> #include <stdio.h>
Tom> main()
Tom> {
Tom> 	FILE *fp;

Tom> 	fp = fopen("t", "w");
Tom> 	fclose(fp);
Tom> }

Tom> If I compile it with
Tom>   gcc prob.c
Tom> it works; but if I use
Tom>   g++ prob.cc
Tom> it bombs!
Tom> Suggestions?

Miss-matching _IO_dump_t structure between libc.a and libstd++.a
causes this problem. 

It seems that configuration program of libg++/libio does not work well.
Fix this problem, and re-compilation of libg++ is needed.

In libg++-2.7.2/libio directory, the entry of _IO_dump_t structure
defined in libioP.h.
=========================
*** libg++ ***
_G_USING_THUNKS is not defined.

#define JUMP_FIELD(TYPE, NAME) struct { short delta1, delta2; TYPE pfn; } NAME

struct _IO_jump_t {
    JUMP_FIELD(_G_size_t, __dummy);
#ifdef _G_USING_THUNKS
    JUMP_FIELD(_G_size_t, __dummy2);
#endif
    JUMP_FIELD(_IO_finish_t, __finish);
.....
    JUMP_FIELD(_IO_close_t, __close);
    JUMP_FIELD(_IO_stat_t, __stat);
=========================

In glibc-2.0.6/libio/ directory, the entry of _IO_dump_t structure
defined in libioP.h.
=========================
*** libc ***
_G_USING_THUNKS is defined.

#define JUMP_FIELD(TYPE, NAME) TYPE NAME

struct _IO_jump_t {
    JUMP_FIELD(_G_size_t, __dummy);
#ifdef _G_USING_THUNKS
    JUMP_FIELD(_G_size_t, __dummy2);
#endif
    JUMP_FIELD(_IO_finish_t, __finish);
.....
    JUMP_FIELD(_IO_close_t, __close);
    JUMP_FIELD(_IO_stat_t, __stat);
===================================
-----
Shinji Sumimoto    E-Mail: s-sumi@trc.rwcp.or.jp
Real World Computing Partnership 


  reply	other threads:[~1998-03-19 15:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-19 13:33 sqrt FPE's and fclose errors Tom Browder
1998-03-19 14:07 ` Tom Browder
1998-03-19 14:30   ` Chris Evans
1998-03-19 15:25     ` Tom Browder
1998-03-19 14:48   ` Tom Browder
1998-03-19 15:53     ` s-sumi [this message]
1998-03-19 14:48   ` Martin Ostermann
1998-03-19 14:58     ` Tom Browder
1998-03-19 18:38   ` Richard Henderson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox