From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31436 invoked by alias); 5 Jun 2008 20:00:36 -0000 Received: (qmail 31415 invoked by uid 22791); 5 Jun 2008 20:00:35 -0000 X-Spam-Check-By: sourceware.org Received: from virus89-out.ccf.swri.edu (HELO virus89-out.ccf.swri.edu) (129.162.252.34) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 05 Jun 2008 20:00:17 +0000 Received: from RKINDREDXP (localhost [127.0.0.1]) by virus89-out.ccf.swri.edu (8.13.1/8.13.1) with SMTP id m55K0F7V016363 for ; Thu, 5 Jun 2008 15:00:15 -0500 (CDT) From: "Robert Kindred" To: Subject: pthreads-win32 and Coverity Date: Thu, 05 Jun 2008 20:00:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2008/txt/msg00024.txt.bz2 Everyone: Has anyone on this mailing list heard of Coverity? I am evaluating it in a desperate attempt to find a bug in my code. When I run it in debug mode, nothing breaks. When my program runs in release mode, it gets an access violation after a couple of days running, which could be anything. Anyway, one of the things Coverity uncovered is called FORWARD NULL. Here is an example below from ptw32_throw.c, line 84: Event var_compare_op: Added "sp" due to comparison "sp == 0" At conditional (1): "sp == 0" taking true path 68 if (NULL == sp || sp->implicit) 69 { 70 /* 71 * We're inside a non-POSIX initialised Win32 thread 72 * so there is no point to jump or throw back to. Just do an 73 * explicit thread exit here after cleaning up POSIX 74 * residue (i.e. cleanup handlers, POSIX thread handle etc). 75 */ 76 unsigned exitCode = 0; 77 78 switch (exception) 79 { 80 case PTW32_EPS_CANCEL: 81 exitCode = (unsigned) PTHREAD_CANCELED; 82 break; At conditional (2): "exception == 1" taking true path 83 case PTW32_EPS_EXIT: Event var_deref_op: Variable "sp" tracked as NULL was dereferenced. 84 exitCode = (unsigned) sp->exitStatus;; 85 break; 86 } In other words, if sp shows to be null at line 68, it should not be dereferenced at line 84. I can show some others, but I am not sure if they are significant. Let me know what you think, Robert Kindred