Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Problem] with fclose()

5 views
Skip to first unread message

Emmanuel DOGUET

unread,
Jan 30, 2003, 6:02:13 AM1/30/03
to
Hello to all,

I have a question : I'm writting a program with dynamic module who use
pthread.

It run fine, but with a lot of load & thread running, I have always a core
dump in function fclose().
If I use open/close instead of fopen/fclose, it's work !?


With GDB I have got :

#0 0x1560fdf8 in _IO_new_file_close_it (fp=0x8065c60) at fileops.c:162
#1 0x15605ed9 in _IO_new_fclose (fp=0x8065c60) at iofclose.c:63
#2 0x156efc38 in play (playIO=0x15c81008, fname=0x19cf3a91
"msg_voc/raw.vox", flags=5) at play.c:1226
#3 0x15571731 in x400_playfile () at eval.c:41

I'm under RedHat 7.(glic 2.2.4 release 13.)

Someone have an idea ?

Kasper Dupont

unread,
Jan 30, 2003, 6:59:46 AM1/30/03
to
Emmanuel DOGUET wrote:
>
> It run fine, but with a lot of load & thread running, I have always a core
> dump in function fclose().

Could be memory corruption:
http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#SIGSEGV

--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:aaa...@daimi.au.dk
for(_=52;_;(_%5)||(_/=5),(_%5)&&(_-=2))putchar(_);

Emmanuel DOGUET

unread,
Jan 30, 2003, 8:00:35 AM1/30/03
to

"Kasper Dupont" <kas...@daimi.au.dk> a écrit dans le message de news:
3E3913B2...@daimi.au.dk...

> Emmanuel DOGUET wrote:
> >
> > It run fine, but with a lot of load & thread running, I have always a
core
> > dump in function fclose().
>
> Could be memory corruption:
> http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#SIGSEGV

But it's always in an fclose() function, can still that ?

Thanks.


Kasper Dupont

unread,
Jan 30, 2003, 9:43:51 AM1/30/03
to

The only reasons for fclose to cause SIGSEGV or SIGBUS is
memory corruption or an incorrect pointer passed as argument
to fclose. Of course there could be a bug in fclose, but
that is just not very likely.

0 new messages