Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!lll-tis!mordor!sri-spam!ames!ptsfa!fdp From: fdp@ptsfa.UUCP (Frank Pedroni) Newsgroups: comp.sources.bugs Subject: Bug in C Checker Message-ID: <4145@ptsfa.UUCP> Date: 25 Feb 88 18:20:06 GMT Organization: Pacific * Bell, San Ramon, CA Lines: 23 Keywords: C When a nested comment is detected, check dumps core. The problem is in lex.l: void cwarn (ln, s) int ln; char *s; { /* Give a warning about a comment, including starting line number */ char msg [120]; (void) sprintf (msg, "%s, starting at line %d,", s, ln); warn (msg); --> free (msg); <-- } Calling free() without previously calling malloc() screws up the allocation pointer so that the next call to malloc() dumps core. Simply delete this line. Frank Pedroni Pacific Bell Concord, CA