public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: carlo@alinoe.com
To: gcc-gnats@gcc.gnu.org
Cc: krempp@cmla.ens-cachan.fr
Subject: libstdc++/3655: Subject: stream bug with "0xBlabla" strings in internal mode
Date: Wed, 11 Jul 2001 16:56:00 -0000	[thread overview]
Message-ID: <20010711235256.7755.qmail@sourceware.cygnus.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]

>Number:         3655
>Category:       libstdc++
>Synopsis:       Subject: stream bug with "0xBlabla" strings in internal mode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 11 16:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Samuel Krempp <krempp@cmla.ens-cachan.fr>
>Release:        3.0 and 3.1
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The bug was reproduced with the following g++ :
gcc version 3.1 20010624 (experimental) - cvs
gcc version 3.1 20010707 (experimental) - cvs
gcc version 3.0 20010402 (Debian prerelease)
i686-pc-linux-gnu

and is not present in
gcc version 2.95.4 20010319 (Debian prerelease)

With the faulty compilers, the resulting string looks like :
Trap!ZZZÜø

(the 2 last chars vary, clearly comig from improper memory accesses)

hth,
-- 
Sam
>How-To-Repeat:
#include <cassert>
#include <iostream>
#include <sstream>

int main(){
  using namespace std;
  stringstream oss;
  oss.setf(std::ostream::internal, std::ostream::adjustfield);
  oss.width(10);
  oss.fill('Z');
  oss << "0xTrap!";
  cout << oss.str() << endl;

  assert( oss.str() == "ZZZ0xTrap!" );

}

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2001-07-11 16:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-11 16:56 carlo [this message]
2001-07-16 12:36 bkoz
2001-11-21 20:36 bkoz
2001-11-21 20:46 bkoz
2001-12-05 14:32 bkoz
2001-12-05 14:36 bkoz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010711235256.7755.qmail@sourceware.cygnus.com \
    --to=carlo@alinoe.com \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=krempp@cmla.ens-cachan.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).