Bug 54820
Summary: | seekp moves backward, but not forward, in ostrstream | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | davidwriter | ||||||
Component: | libstdc++ | Assignee: | Jakub Jelinek <jakub> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 7.1 | CC: | teg | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i686 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2002-12-15 17:57:35 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
davidwriter
2001-10-19 18:54:29 UTC
Created attachment 34423 [details]
C++ file testing seekp
David, as I mentioned on enigma-list, I don't personally know C++ to know wether or not this is a bug, however, I have just confirmed the results above if that helps: pts/16 mharris@zod:~$ ./testseek seekp test Posn after 1st write : 1020 Posn after 1st move : 100 Posn after 2nd move : 100 Bad bit set Posn after 3rd move : 0 pts/16 mharris@zod:~$ rpm -qf /usr/bin/g++ gcc-c++-2.96-95 pts/0 mharris@halden:~$ ./testseek seekp test Posn after 1st write : 1020 Posn after 1st move : 100 Posn after 2nd move : 100 Bad bit set Posn after 3rd move : 0 pts/0 mharris@halden:~$ cat /etc/redhat-release Red Hat Linux release 7.2 (Enigma) pts/0 mharris@halden:~$ g++ -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98) Hope this helps. Converting from non-standard "ostrstream" to standard "ostringstream" (header <sstream>) yields expected behaviour: $ rpm -q gcc-c++ gcc-c++-2.96-98 $ ./testseek2 seekp test2 Posn after 1st write : 1020 Posn after 1st move : 100 Posn after 2nd move : 300 Posn after 3rd move : 0 Or, using GCC3 and libstdc++ v3 yields expected behaviour in both cases, too: $ rpm -q gcc3-c++ gcc3-c++-3.0.1-3 $ ./testseek seekp test Posn after 1st write : 1020 Posn after 1st move : 100 Posn after 2nd move : 300 Posn after 3rd move : 0 $ ./testseek2 seekp test2 Posn after 1st write : 1020 Posn after 1st move : 100 Posn after 2nd move : 300 Posn after 3rd move : 0 Created attachment 42331 [details]
C++ standard version of the example code, working fine
Ok in 3.2 |