In article <[EMAIL PROTECTED]> of Tue, 19 Mar 2002 
16:54:29 in , Gerrit P. Haase <[EMAIL PROTECTED]> writes
> Walter,
>
>Dienstag, 19. Mrz 2002 16:51:59, du schriebst:
[snip]
>I did also remade cgrammer.o and then all works ok.  I guess some
>problem with timing because I used -j3 for up to three parallel make
>processes.
>
>But I still get segmentation faults during the test run.
I think I was confused by your original report as a result of your usage 
of -j3. I think you may have hit a double free problem, I already fell 
over in win32 environments. It is bizarrely hidden in most environments.

Try the following:

D:\splint\splint-3.0.1.6\lib> type extract.h
int vsprintf (void) /*@warn bufferoverflowhigh "Use vsnprintf instead"@*/;

D:\splint\splint-3.0.1.6\lib> which splindel
C:/WFB/BIN/splindel.exe

D:\splint\splint-3.0.1.6\lib> which splint
C:/WFB/BIN/splint.exe

D:\splint\splint-3.0.1.6\lib> dir c:\wfb\bin\splin*.exe

  Volume in drive C has no label
  Volume Serial Number is 321E-13FD
  Directory of C:\wfb\bin

SPLINDEL EXE     1,318,912  10/02/02  22:35 splindel.exe
SPLINT   EXE     1,769,472  13/03/02  14:39 Splint.exe
          2 file(s)      3,088,384 bytes
          0 dir(s)       16,870.80 MB free

splindel.exe is what was delivered. I built splint with different options
with the bug fix below.  I believe David Evans has a different fix on CVS.
Ignore the fact that the failure point varies.  The cause is the same
if you are hitting what I hit.

D:\splint\splint-3.0.1.6\lib> splindel -nof -nolib +impconj extract.h
Splint 3.0.1.6 --- 11 Feb 2002

Finished checking --- no warnings
*** Segmentation Violation
*** Location (not trusted): extract.h(2,1)
*** Last code point: C:\splint-3.0.1.6\src\context.c(4233)
*** Previous code point: C:\splint-3.0.1.6\src\context.c(4231)
*** Please report bug to [EMAIL PROTECTED]

D:\splint\splint-3.0.1.6\lib> splint -nof -nolib +impconj extract.h
Splint 3.0.1.6 --- 11 Feb 2002

Finished checking --- no warnings

D:\splint\splint-3.0.1.6\lib>

D:\splint\splint-3.0.1.6\src> diff -c warnClause.c.0 warnClause.c
*** warnClause.c.0      Tue Jan  8 21:20:10 2002
--- warnClause.c        Wed Mar 13 09:47:04 2002
***************
*** 44,51 ****
--- 44,56 ----
   extern warnClause warnClause_create (lltok tok, flagSpec flag, cstring msg)
   {
     warnClause res;
+ #if 1
     res = warnClause_createAux (lltok_stealLoc (tok), flag, msg);
     lltok_release (tok);
+ #else
+   lltok_release (tok);
+   res = warnClause_createAux (fileloc_undefined, flag, msg);
+ #endif
     return res;
   }

D:\splint\splint-3.0.1.6\src>

The old code is in the #if 1 branch; the fix in #else.

-- 
Walter Briscoe

Reply via email to