[ 
https://issues.apache.org/jira/browse/STDCXX-949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Farid Zaripov updated STDCXX-949:
---------------------------------

    Attachment: stdcxx-949.patch

The proposed patch is attached.

ChangeLog:
{noformat}
2008-06-03  Farid Zaripov  <[EMAIL PROTECTED]>

        * include/fstream.cc (close): Zero out file pointer even when close() is
        called from detach() and all data flushed successfully.
        * tests/iostream/27.filebuf.cpp (test_ctors): Detach pfb from file 
pointer
        before delete because of the file is already closed in fb dtor.
        (test_attach): Close file descriptor before removing the file.
{noformat}

> 27.filebuf test fails with assertions
> -------------------------------------
>
>                 Key: STDCXX-949
>                 URL: https://issues.apache.org/jira/browse/STDCXX-949
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: trunk
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>             Fix For: 4.2.2
>
>         Attachments: stdcxx-949.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The 27.filebuf test fails with the following assertions and warnings:
> {noformat}
> # ASSERTION (S7) (5 lines):
> # TEXT: basic_filebuf<char>::is_open() == false, got true after a call to 
> detach()
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1424
> # ASSERTION (S7) (5 lines):
> # TEXT: basic_filebuf<char>::fd() < 0, got 3 after a call to detach()()
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1431
> # ASSERTION (S7) (5 lines):
> # TEXT: basic_filebuf<char>::~basic_filebuf() attempted to close a detached 
> file descriptor
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1443
> # WARNING (S5) (5 lines):
> # TEXT: std::remove("C:\Temp\.rwtest-tmp11") failed: Permission denied
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1519
> # ASSERTION (S7) (5 lines):
> # TEXT: basic_filebuf<char>::is_open() unexpectedly true after a successful 
> call to detach()
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1593
> # ASSERTION (S7) (5 lines):
> # TEXT: basic_filebuf<wchar_t>::is_open() == false, got true after a call to 
> detach()
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1424
> # ASSERTION (S7) (5 lines):
> # TEXT: basic_filebuf<wchar_t>::fd() < 0, got 3 after a call to detach()()
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1431
> # ASSERTION (S7) (5 lines):
> # TEXT: basic_filebuf<wchar_t>::~basic_filebuf() attempted to close a 
> detached file descriptor
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1443
> # WARNING (S5) (5 lines):
> # TEXT: std::remove("C:\Temp\.rwtest-tmp12") failed: Permission denied
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1519
> # ASSERTION (S7) (5 lines):
> # TEXT: basic_filebuf<wchar_t>::is_open() unexpectedly true after a 
> successful call to detach()
> # CLAUSE: [lib.filebuf]
> # FILE: 27.filebuf.cpp
> # LINE: 1593
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to