Mail Archives: djgpp/1996/10/06/10:51:47
A reasonably large program I am writing *sometimes* crashes out with a Page
Fault. When I run symify, the fault appears to be in malloc
( _malloc+192 to be exact). However, I suspect this is caused by a wild
pointer of my own.
Tracing the flow, the error occurs in the middle of a lot of small mallocs
(generally 1 - 10 bytes).
AFAICS, I have set all my pointers to be initialised to NULL, but the error
still occurs sometimes. I'm using -O3 at the moment.
Any help appreciated!
.splitbung (pwei barmy army, essex paragraph) http://www.tsys.demon.co.uk
--
#include <stdio.h> /* The .splitbung super .sig system! */
#include <string.h>
main(){FILE *f;int c;char s[99];puts("fav .sig: ");fgets(s,99,stdin);strtok
(s,"\n");f=fopen(s,"rb");while((c=getc(f))!=EOF)putchar(c);if(f)fclose(f);}
- Raw text -