[PATCH v2] shlwapi/tests: Document where SHFormatDateTimeA() crashes for NULL pointers.

Huw Davies huw at codeweavers.com
Wed Sep 1 02:48:33 CDT 2021


On Wed, Sep 01, 2021 at 09:25:56AM +0200, Francois Gouget wrote:
> Knowing which Windows versions have been confirmed to crash will make it
> easier to know whether that information is potentially obsolete if the
> Windows behavior changes.
> 
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> v2: Indented.
> 
> The if (0) is likely to stay there for a good while so it makes sense to 
> indent the corresponding test.
> ---
>  dlls/shlwapi/tests/ordinal.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c
> index bf43d35b1c2..8a294ec1751 100644
> --- a/dlls/shlwapi/tests/ordinal.c
> +++ b/dlls/shlwapi/tests/ordinal.c
> @@ -1674,11 +1674,8 @@ static void test_SHFormatDateTimeA(void)
>      DWORD flags;
>      INT ret;
>  
> -if (0)
> -{
> -    /* crashes on native */
> -    pSHFormatDateTimeA(NULL, NULL, NULL, 0);
> -}
> +    if (0) /* crashes on Windows XP to Windows 10 20H2 */
> +        pSHFormatDateTimeA(NULL, NULL, NULL, 0);

I don't see the point of this sort of thing.  Why do we care that
Windows crashes?  No sane app is ever going to rely on this.
Documenting which Windows versions crash seems even more of a waste of
time; are we really going to update this after every new Windows
release?

Huw.



More information about the wine-devel mailing list