Subject: Re: The _weirdest_ segfault...
To: None <>
From: Peter Seebach <>
List: port-alpha
Date: 05/17/2000 14:54:59
In message <>, Andrea
s Falck writes:
>> 	Out of curiosity, what value are you passing to malloc()?
>Of course, I forgot:
>temp = malloc((i + 1) * (sizeof(char)));
>It allocates memory for a token out of a whitespace-separated string.

I'd check what i is, Just In Case.

Do you have <stdlib.h> included?  Is there any possibility that you might
have mistakenly provided your own prototype for malloc?  malloc takes a
size_t, which is 64 bits on Alpha, and this has been known to surprise people

Also, sizeof(char) is 1, and is always 1, and cannot be other than 1, and
has always been 1, and will always be 1, and can be safely omitted.  :)