Bug 11554
Summary: | setbuf coredumps when linked against libstdc++ | ||
---|---|---|---|
Product: | [Retired] Red Hat Raw Hide | Reporter: | Jonathan Kamens <h1k6zn2m> |
Component: | libstdc++ | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2000-05-22 14:53:11 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: |
Description
Jonathan Kamens
2000-05-21 17:40:02 UTC
Another problem which I'm willing to bet is related to this bug.... Run "ed /etc/profile" with glibc-2.1.90-11 installed. Type "1" and hit return, which should cause ed to display the first line of text. It doesn't. Type "q" and hit return and note that ed then displays all the text it should have displayed before. This behavior goes away if you comment out the line "setbuffer (stdin, stdinbuf, 1);" in buf.c in the ed source code. Or if you replace it with the "setvbuf" call below it. A simpler example.... The following program will sleep for 2 seconds and then print and 'a' and a newline; it should have printed the 'a' and the newline *before* sleeping for two seconds. Interestingly enough, if you remove the "putchar('a');" so that all it's printing is the newline, then the newline *does* get printed before the two-second sleep, as it should. #include <stdio.h> main() { static char buf[1]; setbuffer(stdin, buf, 1); putchar('a'); putchar('\n'); sleep(2); } assign to jakub Both of these were fixed on 2000-05-21. |