public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/9404: stringbuf::sputc doesn't call overflow if output buffer full
@ 2003-02-07 15:44 paolo
0 siblings, 0 replies; 3+ messages in thread
From: paolo @ 2003-02-07 15:44 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, paolo, peturr02
Synopsis: stringbuf::sputc doesn't call overflow if output buffer full
Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Fri Feb 7 15:44:47 2003
Responsible-Changed-Why:
Investigating.
State-Changed-From-To: open->analyzed
State-Changed-By: paolo
State-Changed-When: Fri Feb 7 15:44:47 2003
State-Changed-Why:
Confirmed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9404
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libstdc++/9404: stringbuf::sputc doesn't call overflow if output buffer full
@ 2003-05-18 8:08 paolo
0 siblings, 0 replies; 3+ messages in thread
From: paolo @ 2003-05-18 8:08 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, paolo, peturr02
Synopsis: stringbuf::sputc doesn't call overflow if output buffer full
State-Changed-From-To: analyzed->closed
State-Changed-By: paolo
State-Changed-When: Sun May 18 08:08:00 2003
State-Changed-Why:
Fixed for 3.4.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9404
^ permalink raw reply [flat|nested] 3+ messages in thread
* libstdc++/9404: stringbuf::sputc doesn't call overflow if output buffer full
@ 2003-01-22 16:46 peturr02
0 siblings, 0 replies; 3+ messages in thread
From: peturr02 @ 2003-01-22 16:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 9404
>Category: libstdc++
>Synopsis: stringbuf::sputc doesn't call overflow if output buffer full
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 22 16:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: peturr02@ru.is
>Release: gcc-3.2.1
>Organization:
>Environment:
Red Hat Linux 8.0
>Description:
If sb is an instance of a class derived from stringbuf and sb.pptr() == sb.epptr(), calling sb.sputc does not cause overflow to be called.
>How-To-Repeat:
See attachment.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="sputcbug.cc"
Content-Disposition: inline; filename="sputcbug.cc"
#include <sstream>
using namespace std;
bool called = false;
class Derived_stringbuf : public stringbuf
{
public:
int_type overflow(int_type c)
{
called = true;
return stringbuf::overflow(c);
}
const char_type* pub_epptr() const
{
return epptr();
}
const char_type* pub_pptr() const
{
return pptr();
}
};
int main()
{
Derived_stringbuf dsbuf;
dsbuf.sputc('c');
assert(called);
assert(dsbuf.pub_epptr() == dsbuf.pub_pptr());
called = false;
dsbuf.sputc('a');
assert(called);
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-05-18 8:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-07 15:44 libstdc++/9404: stringbuf::sputc doesn't call overflow if output buffer full paolo
-- strict thread matches above, loose matches on Subject: below --
2003-05-18 8:08 paolo
2003-01-22 16:46 peturr02
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).