STL bug in VS.NET 2002

From: Antonio Maiorano (maiorano_at_videotron.ca)
Date: 11/08/03


Date: Sat, 8 Nov 2003 12:38:14 -0500

Hi everyone,

I use Visual Studio .NET 2002 right now, and I discovered a bug last night
that I have found few references to on the internet. Basically, if you
allocated a null-terminated char array that is 16 bytes or longer to
std::string, it stores garbage into it:

std::string s = "1234567890123456";

I tried this on .NET 2003 at work, and this bug has been fixed. Indeed, I
stepped into the string code, and found the difference somewhere in
<xstring>.

Anyway, my question is: what do I do? Do I really have to remove 2002 and
install 2003? Is there an bug-free STL implementation that I can download
somewhere and use instead? I have found no mention of this bug on M$ website
(big surprise).

Thank you for your time,

Tony



Relevant Pages

  • Re: Addicted to Delphi 2005.
    ... I don't know if this is the same bug, but I have run into a very annoying bug ... icons for the entire program. ... fact the references to the imagelist itself are gone then. ... caused by bugs in Delphi itself or in the third-party components I'm ...
    (borland.public.delphi.non-technical)
  • Re: Sangband is back.
    ... I'm not sure if this should go privately (since technically it's a bug ... sent a private bug report to a maintainer of a variant I got no response ... than modifying the references in the Makefile appropriately). ...
    (rec.games.roguelike.angband)
  • error C2371: WCHAR : redefinition; different basic types
    ... a lot of search on the internet but haven't found any solution to ... Which seems to be a bug to me. ...
    (microsoft.public.vc.mfc)
  • Re: [SLE] Little_endian.h errors
    ... This looks a lot like the bug I was working to figure out to get kscd to ... references byteorder, which references little_endian.h, which is defined ... Also check the archives at http://lists.suse.com ...
    (SuSE)
  • Re: kernel BUG at page_alloc.c:98 -- compiling with distcc
    ... > sorry if I did not follow this thread from the beginning, but why is distcc ... because with sendfile() its possible that such IRQ context ... In fact it seems trivial to trigger the bug in question: ... quickly close the file, no existing user references, only the ...
    (Linux-Kernel)