From: "Robert Kindred" <RKindred@SwRI.edu>
To: <pthreads-win32@sourceware.org>
Subject: pthreads-win32 and Coverity
Date: Thu, 05 Jun 2008 20:00:00 -0000 [thread overview]
Message-ID: <IIEJIMCOHAKGODCMHFEOIEPACEAA.RKindred@SwRI.edu> (raw)
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
reply other threads:[~2008-06-05 20:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=IIEJIMCOHAKGODCMHFEOIEPACEAA.RKindred@SwRI.edu \
--to=rkindred@swri.edu \
--cc=pthreads-win32@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).