Re: NULL strings cause "segmenation fault"

Herbert Rosmanith (herp@wildsau.idv.uni-linz.ac.at)
Tue, 24 Sep 1996 01:49:03 +0200 (MET DST)


> if (strcmp(s, t) == 0)
>
> It seems that if s or t are NULL pointers (as they are when first
> allocated) then I get the fault. According to the MAN page on strcmp, if

if you are using ELF you get a segfault. if you are using AOUT you
dont get a segfault. instead the process in question can consume
up to 99% of CPUcycles. so getting a segfault is better.