John David Anglin wrote:- > I know alloca caused the segmentation fault. Right, but I suspect that's because it overflowed your stack with the same huge allocation that malloc had. The best solution is to remove any dependence on external implementations and write our own basename (). Neil.