Hylafax Mailing List Archives

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

Re: faxmail fails on mime message/rfc822



Hi Andrew,

At 09:59 1/09/98 +0900, Andrew S. Howell wrote:
>The only problem that I had was fclose causing a segv. When I was
>running faxmail under gdb, I did:
>
>	faxmail -v < some_captured_mail.txt
>
>Looks like an bug in libgcc or somewhere. This was on Linux at home,
>while I at work I run it under SunOS 4.1.4. Under Linux:
>

Almost - the bug is in textfmt it fclose()'s twice.

Its because the other libc's have static array of FILE structs allocated
when the program starts that don't get deleted till its finished. glibc2
allocates FILE structs as needed.

Small sample prog:
	FILE* f1, f2;
	f1 = fopen("file1.txt", "r");
	fclose(f1);
	f2 = fopen("file2.txt", "r");
	fclose(f1);

Under glibc2 this segfaults, under the other libc's(ie Sun OS) you just
close f2!!!

There is a small patch for this at: http://www.trump.net.au/~rjc/hylafax/

- Robert



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services