[Bug libstdc++/35763] std::cout loses whole blocks of output if interrupted by signal without SA_RESTART

2013-11-27 Thread schaub.johannes at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35763

Johannes Schaub schaub.johannes at googlemail dot com changed:

   What|Removed |Added

 CC||schaub.johannes@googlemail.
   ||com

--- Comment #4 from Johannes Schaub schaub.johannes at googlemail dot com ---
Created attachment 31309
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31309action=edit
Reproduction of badbit


[Bug libstdc++/35763] std::cout loses whole blocks of output if interrupted by signal without SA_RESTART

2013-11-27 Thread schaub.johannes at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35763

--- Comment #5 from Johannes Schaub schaub.johannes at googlemail dot com ---
We also have this bug and it took us several days to find the cause. Testcase
by my colleague attached.

Perhaps this should fire an assertion if it is hard to fix efficiently, instead
of simply letting things go wrong unnoticed.


[Bug libstdc++/35763] std::cout loses whole blocks of output if interrupted by signal without SA_RESTART

2008-03-30 Thread pcarlini at suse dot de


--- Comment #3 from pcarlini at suse dot de  2008-03-30 09:24 ---
This is tightly coupled to libstdc++/35353: in the current design, when
sync_with_stdio is false (by default), the stream is non-converting and synced
with C stdio, simply forwards to stdio functions. Unfortunately, the fix is not
forthcoming, there are very serious performance implications, and binary
compatibility issues (which probably can be solve only by breaking the ABI).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35763



[Bug libstdc++/35763] std::cout loses whole blocks of output if interrupted by signal without SA_RESTART

2008-03-29 Thread zlynx at acm dot org


--- Comment #1 from zlynx at acm dot org  2008-03-30 03:43 ---
Forgot to mention, I filed a bug for fwrite too:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=5998

Until they fix that (if they do) it will be useless to check fwrite's return
value since you can't know how many bytes were written.

I think the fix would be to use write directly or to use the file operations
(which do seem to use write directly and check for EINTR returns) on fd 0.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35763



[Bug libstdc++/35763] std::cout loses whole blocks of output if interrupted by signal without SA_RESTART

2008-03-29 Thread zlynx at acm dot org


--- Comment #2 from zlynx at acm dot org  2008-03-30 03:46 ---
Created an attachment (id=15399)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15399action=view)
test program, build: g++ timer-test.cc -lrt


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35763