HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 0116 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 0116.


Report 0116 Actions


    Problem Report Number 0116
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0116
    Raised 1993-11-11 08:00
    Updated 2003-03-13 08:00
    Published 1993-11-19 08:00
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.2.4
    Test Identification ANSI.os/streamio/fclose 6
    Problem Summary TSD4.116 Although the problem manifests itself in test 6, the real problem seems to be in test 5. In test 5, a call is made at the end of the test to the function closesync() with the c_syn file descriptor as ...
    Problem Text
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Although the problem manifests itself in test 6, the real problem
    seems to be in test 5. In test 5, a call is made at the end of
    the test to the function closesync() with the c_syn file descriptor
    as the lone parameter. closesync() calls free() with c_syn as the
    pointer to be "free'd". In test 5, however, no previous call was
    made to opensync() for the c_syn file descriptor which would have
    malloc'd space for c_syn. The result is that a call to free() is
    made with an invalid pointer (not previously malloc'd). In the
    description section of free() in the CAE Specification, System
    Interfaces and Headers, Issue 4, it reads: "Any use of a pointer
    that refers to freed space causes undefined behaviour."

    This erroneous free() causes a failure in the subsequent test 6
    execution when it tries to re-use the c_syn file descriptor. When
    the closesync(c_syn) is removed from test 5, all tests pass.
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Test Output
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    /tset/ANSI.os/streamio/fclose/T.fclose 6 Failed

    Test Description:
    fclose() is performed automatically for all open streams when abort()
    is called.
    Posix Ref: Component ABORT Assertion 8.2.3.12-XX(A)

    Test Strategy:
    CREATE child process using cpsig() - (tsetlib) so that the test case
    is not deleted if the child is deliberately killed
    CHILD:
    OPEN stream using fopen()
    WRITE data using fputs()
    VERIFY that the file has zero length using stat()
    SET SIGABRT signal to take the default action ie terminate the
    current process
    SEND SIGABRT signal to current process by calling abort()
    PARENT:
    SET timeout using SET_TIMEOUT macro
    WAIT for child to exit using waitpid()
    CLEAR outstanding alarm using CLEAR_ALARM macro
    VERIFY that the child process did not time out
    VERIFY that the child called exit() successfully
    VERIFY that the test case was not deleted by the child process (ie
    did not call exit(1))
    VERIFY that the child process was killed by SIGABRT signal
    VERIFY that the file is of the expected length
    UNLINK file

    Test Information:
    deletion reason: waitsync() failed - errno 4(EINTR)
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This is an accepted test suite deficiency which has been corrected in a
    later release.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion
    This is an agreed Test Suite Deficiency.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority