[Bug libstdc++/81751] [5/6/7 Regression]__basic_file::sync() may flush _all_ files

2017-08-11 Thread bugzilla.volker at kabelmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81751 --- Comment #9 from Volker Wehrs --- Thank you, I guess that change should fix the bug.

[Bug libstdc++/81751] __basic_file::sync() may flush _all_ files

2017-08-09 Thread bugzilla.volker at kabelmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81751 --- Comment #5 from Volker Wehrs --- I'm sorry but I ignored the first if-clause in sys_open(). That if-clause makes sure there is no open file referenced by the __basic_file, otherwise sys_open() fails. Then the sync() is called before the new

[Bug libstdc++/81751] __basic_file::sync() may flush _all_ files

2017-08-09 Thread bugzilla.volker at kabelmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81751 --- Comment #3 from Volker Wehrs --- Why is sync() (alias fflush()) called in sys_open(FILE*,...) at all? 1. It is not called in sys_open(int,...) 2. Both sys_open() functions are called in the constructor of stdio_filebuf _only_. So, as

[Bug libstdc++/81751] New: __basic_file::sync() may flush _all_ files

2017-08-07 Thread bugzilla.volker at kabelmail dot de
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: bugzilla.volker at kabelmail dot de Target Milestone: --- When creating a stdio_filebuf from a FILE* the constructor calls __basic_file::sys_open() which in turn calls __basic_file::sync(). Sync() unconditionally makes