Re: basic_string causes crash in _vsnprintf???

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks the information about the earlier version I had not validated yet.
We'll look for those with pc-lint.

Thanks for the help.


"Tom Widmer [VC++ MVP]" wrote:

> WXS wrote:
> > We are on a fairly old stlport where I believe it is reliable. The newer
> > versions don't work that way to my understanding.. so for the moment we could
> > live with the older version although we know there are bugs an issues in the
> > older one we are at least aware of all of the significant ones.
>
> I think that you may be mistaken. Since STLport first had std::string
> (back in version 3.12?), the size has *always* been greater than 4,
> which means that you can't treat it as a char* in varargs functions. It
> seems likely you're sitting on a time bomb, and just haven't yet noticed
> a large number number of bugs due to this (it only triggers when you
> have further varargs after a std::string - those varargs will all be
> corrupt).
>
> I suggest you try the hello world program I posted with the version you
> are using, but I think you are going to discover that your code is
> broken anyway.
>
> Tom
>
.



Relevant Pages

  • Re: How to improve C skill?
    ... code through it, and _understand_ what it tells you (i.e., fix the ... I've used PC-lint on C and C++ code and have found it invaluable. ... almost all cases flagged one or more plain and simple bugs. ...
    (comp.lang.c)
  • Re: basic_string causes crash in _vsnprintf???
    ... WXS wrote: ... versions don't work that way to my understanding.. ... It seems likely you're sitting on a time bomb, and just haven't yet noticed a large number number of bugs due to this (it only triggers when you have further varargs after a std::string - those varargs will all be corrupt). ...
    (microsoft.public.vc.stl)