stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <>
Subject RE: Convert MSVC CRT debug reports to rwtest driver debug reports
Date Tue, 26 Jun 2007 09:52:43 GMT
> -----Original Message-----
> From: Martin Sebor [] 
> Sent: Tuesday, June 26, 2007 1:31 AM
> To:
> Subject: Re: Convert MSVC CRT debug reports to rwtest driver 
> debug reports
> Farid Zaripov wrote:
> >   In some tests in debug mode GUI popups appear.
> >   We can disable this popups by using _CrtSetReportMode(, 
> > _CRTDBG_MODE_DEBUG), but I think it would be useful to convert them 
> > into the rwtest debug reports (rw_warn(), rw_error(), rw_assert()).
> > This conversion can be made by installing custom hook function.
> Sounds reasonable, but I'd like to know a little bit more 
> about what types of errors we're dealing with here.
> Which of the three types of diagnostics does your patch 
> convert them to? I think rw_error() would be appropriate for 
> undefined behavior like memory corruption detected by the 
> CRT, etc. What other types of errors cause these popups?

  The MSVC CRT has three types of report: _CRT_WARN, _CRT_ERROR, and

#define _CRT_WARN 0
#define _CRT_ERROR 1
#define _CRT_ASSERT 2

  These types mapped to rw_warn(), rw_error() and rw_assert()

> >   And also MSVC8 CRT performs parameter checking with invoking 
> > Dr.Watson tool (the result is GUI
> > popup) in case the invalid parameter was passed to the CRT 
> function. I 
> > suggest to convert this popups to the rw_note() reports (or maybe 
> > rw_error()).
> In terms of the severity, rw_note() is quite different from 
> rw_error(), so it's important to understand what types of 
> errors we're dealing with. Can you give more detail about 
> these invalid parameter errors, or a few examples?

  For example in test 21.cwchar.cpp line 934 the wcsftime() invoked with
the parameter size == 0.
Actually zero value is valid for that function, but MSVC CRT performs
validation to size != 0 and
issues Dr.Watson popup. Because of that we can't convert invalid
parameter errors to rw_error()
even if in some other case the checked parameter would be invalid. 


View raw message