<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
James Hawkins wrote:
<blockquote
 cite="mid:22821af30810101323x1a16c0e8y230b42308a944e97@mail.gmail.com"
 type="cite">
  <pre wrap="">On Fri, Oct 10, 2008 at 3:17 PM, Andrey Turkin <a class="moz-txt-link-rfc2396E" href="mailto:andrey.turkin@gmail.com">&lt;andrey.turkin@gmail.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Imagine broken application which for some reason, e.g. non-allocated memory,
supply NULL to this function, and then catch, eat and spew an exception
somewhere in different place. Joe the Developer start searching for root
cause - he looks at logs, see first-chance exception, look in
CredReadDomainCredentials source and see unguarded dereferencing. Is this
intended or mistake? That should code really do? The comment would be handy
here (at least for me tests wouldn't be the first place to look at for
answers in such situation).
I can see the value and cannot see any harm, and frankly I am reluctant to
issuing [try4] patch with just another minor comment change.

    </pre>
  </blockquote>
  <pre wrap=""><!---->
You just said that the tests crash in Windows.  If the tests crash in
Windows, then how does this app work there either?  That's the point
of tests: to verify that our implementation matches native.
  </pre>
</blockquote>
We know my implementation and Windows implementation behave identically
and this is documented in tests. At this <br>
point you and me both happy about the comment in tests and tests in
general, right?<br>
Now back to the example. In this example something somewhere went wrong
because of Windows/Wine differences,<br>
&nbsp;e.g. previous memory allocation failed or something. Completely
unrelated to this particular function, and our Joe should<br>
not spend his time trying to understand the function itself - and code
comments do just that. Joe read the comment, understand<br>
that NULL pointer should not be passed in the first place, and continue
his quest. Sounds useful for me, and certainly looks <br>
harmless (apart from causing this thread to go on). <br>
<br>
</body>
</html>