On Fri, 9 Mar 2007, Michael Stefaniuc wrote:
[...]
> Ok, as there are no false positives i have improved the script a little;
> documented it on my Smatch page and added it to my daily Smatch run.
Thanks a lot for the Smatch script. It has proven pretty useful already.
--
Francois Gouget <[EMAIL
Alexandre Julliard wrote:
> Michael Stefaniuc <[EMAIL PROTECTED]> writes:
>
>> Ok, as there are no false positives i have improved the script a little;
>> documented it on my Smatch page and added it to my daily Smatch run.
>> If you know more functions that return a file_handle i can search for
>
Michael Stefaniuc <[EMAIL PROTECTED]> writes:
> Ok, as there are no false positives i have improved the script a little;
> documented it on my Smatch page and added it to my daily Smatch run.
> If you know more functions that return a file_handle i can search for
> those too. At the moment i'm loo
Michael Stefaniuc wrote:
> Francois Gouget wrote:
>
>>On Wed, 7 Mar 2007, Michael Stefaniuc wrote:
>>[...]
>>Sending patches...
>
> Send a patch too for the additional occurence that the improved script
> has found.
Duh ... I mean I have sent a patch already for the additional bug found
by the i
Francois Gouget wrote:
> On Wed, 7 Mar 2007, Michael Stefaniuc wrote:
> [...]
>
>>You mean something like
>>http://people.redhat.com/mstefani/wine/smatch/scripts/file_handles.pl ?
>
>
> Cool, thanks.
>
>
> [...]
>
>>Most are false positives (non NULL check before CloseHandle()).
>
>
> These
Na , Alexandre Julliard <[EMAIL PROTECTED]> escreveu:
Francois Gouget <[EMAIL PROTECTED]> writes:
These are not false positives. Any file handle that is not
INVALID_HANDLE_VALUE must be closed with CloseHandle(). So these checks
should be against INVALID_HANDLE_VALUE, not NULL. In fact they ma
On Thu, 8 Mar 2007, Alexandre Julliard wrote:
[...]
> Sure, it's best to avoid closing an invalid handle. We don't throw an
> exception but we do set last error, and this could conceivably break
> something. But the NULL check is not going to cause us to forget to
> close a valid handle, which woul
Francois Gouget <[EMAIL PROTECTED]> writes:
> On Thu, 8 Mar 2007, Alexandre Julliard wrote:
> [...]
>> Note that a valid file handle will never be NULL, so while these
>> checks are wrong in theory, in practice it makes no difference.
>
> Right. But the invalid check means that in some cases we wi
On Thu, 8 Mar 2007, Alexandre Julliard wrote:
[...]
> Note that a valid file handle will never be NULL, so while these
> checks are wrong in theory, in practice it makes no difference.
Right. But the invalid check means that in some cases we will call
CloseHandle(INVALID_HANDLE_VALUE) which the M
Alexandre Julliard wrote:
> Francois Gouget <[EMAIL PROTECTED]> writes:
>
>
>>These are not false positives. Any file handle that is not
>>INVALID_HANDLE_VALUE must be closed with CloseHandle(). So these checks
>>should be against INVALID_HANDLE_VALUE, not NULL. In fact they may
>>possibly be
Francois Gouget <[EMAIL PROTECTED]> writes:
> These are not false positives. Any file handle that is not
> INVALID_HANDLE_VALUE must be closed with CloseHandle(). So these checks
> should be against INVALID_HANDLE_VALUE, not NULL. In fact they may
> possibly be removed altogether.
Note that a
On Wed, 7 Mar 2007, Michael Stefaniuc wrote:
[...]
> You mean something like
> http://people.redhat.com/mstefani/wine/smatch/scripts/file_handles.pl ?
Cool, thanks.
[...]
> Most are false positives (non NULL check before CloseHandle()).
These are not false positives. Any file handle that is not
Francois Gouget wrote:
> Jacek just sent a patch fixing the following bug:
>
> file = CreateFileW(fileName, GENERIC_READ, 0, NULL, OPEN_EXISTING,
> FILE_ATTRIBUTE_READONLY,NULL);
> -if(file) {
> +if(file != INVALID_HANDLE_VALUE) {
>
> This looks like something that could be turned i
Jacek just sent a patch fixing the following bug:
file = CreateFileW(fileName, GENERIC_READ, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_READONLY,NULL);
-if(file) {
+if(file != INVALID_HANDLE_VALUE) {
This looks like something that could be turned into a nice Smatch test.
Hint, hint...
14 matches
Mail list logo