Subject: Re: The _weirdest_ segfault...
To: None <firstname.lastname@example.org>
From: Peter Seebach <email@example.com>
Date: 05/17/2000 17:11:43
In message <Pine.GSO.firstname.lastname@example.org>, Andrea
s Falck writes:
>Of course. Though it sounded like Peter thought that it was a usual "write
>beyond bounds" problem. I see what you mean.
Even that will behave differently, just because the alpha may have different
>"-Wall -Wpointer-arith -Wcast-align -Werror" passes.
>I tried "lint" for the first time now, and it screams! No clean file in
>the project, lots of warnings and errors. :)
lint is, IMHO, too silly.
>> Do you cast between char * and other pointer types ever?
>Yes, many times. At least (void *) <-> (char *).
That's not a problem, there's no change there. IMHO, casting to and from
(void *) is bad mojo in most contexts.
>It seems like there is much to do to make it run cleanly on the
>Alpha. Maybe I make it a real project making it work after all.
My advice would be to first go with the assumption that there's somplace
where you allocate too little space.
In particular, look for malloc(0). If you have a typo that results in no
space being allocated, you still get a valid pointer to at least 0 bytes