|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0233 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0233.
Report 0233 Actions
Problem Report Number 0233 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0233 Raised 1995-09-06 08:00 Updated 2003-03-13 08:00 Published 1995-09-11 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.5 Test Identification XPG4.os/wstreamio/ungetwc 1 Problem Summary TSD4.233 The VSX suite is using freopen() in a non-portable manner. A stream is often closed by fclose() prior to being passed to freopen(). freopen() cannot be expected to work with closed streams. Section 4.... Problem Text
The VSX suite is using freopen() in a non-portable manner. A stream is
often closed by fclose() prior to being passed to freopen(). freopen()
cannot be expected to work with closed streams. Section 4.9.5.4 of the
C standard states:
"The {freopen} function opens the file whose name is the string
pointed to by {filename} and associates the stream pointed to
by {stream} with it."
A stream that has been closed can no longer be considered a valid stream
and should not be passed to freopen(). From section 4.9.3 of the C
standard:
"The value of a pointer to a {FILE} object is indeterminate
after the associated file is closed ..."
An implementation may choose to implement streams in such a way that the
storage previously allocated to the stream structures is no longer
accessible. Operations on the pointer that used to point to the stream
can cause unpredictable results.
Only valid streams which are currently open should be passed to
freopen(). Put another way, a file cannot be "re-opened" if it wasn't
"open" to begin with.
NOTE: This error was reported for the following failing testcases in
VSX 4.3.4 version of the test suite. (This was our internal reference
number vsx.015.):
/tset/ANSI.os/streamio/freopen/T.freopen 5 Unresolved
/tset/ANSI.os/streamio/freopen/T.freopen 6 Failed
/tset/ANSI.os/streamio/freopen/T.freopen 8 Failed
/tset/ANSI.os/streamio/freopen/T.freopen 9 Failed
/tset/ANSI.os/streamio/freopen/T.freopen 13 Failed
/tset/ANSI.os/streamio/freopen/T.freopen 14 Failed
/tset/ANSI.os/streamio/freopen/T.freopen 16 Failed
/tset/ANSI.os/streamio/freopen/T.freopen 17 Failed
/tset/ANSI.os/streamio/freopen/T.freopen 19 Failed
/tset/ANSI.os/streamio/freopen/T.freopen 30 Failed
/tset/ANSI.os/streamio/gets/T.gets 7 Uninitiated
/tset/ANSI.os/streamio/gets/T.gets 8 Uninitiated
/tset/ANSI.os/streamio/gets/T.gets 9 Uninitiated
/tset/ANSI.os/streamio/gets/T.gets 10 Uninitiated
/tset/ANSI.os/streamio/gets/T.gets 11 Uninitiated
/tset/ANSI.os/streamio/gets/T.gets 12 Uninitiated
/tset/ANSI.os/streamio/gets/T.gets 13 Uninitiated
/tset/ANSI.os/streamio/gets/T.gets 14 Uninitiated
/tset/ANSI.os/streamio/scanf/T.scanf 2 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 3 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 4 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 5 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 6 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 7 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 8 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 9 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 10 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 11 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 12 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 13 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 14 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 15 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 16 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 17 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 18 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 19 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 20 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 21 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 22 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 23 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 24 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 25 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 26 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 27 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 28 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 29 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 30 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 32 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 33 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 35 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 36 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 37 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 38 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 39 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 40 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 41 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 42 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 43 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 44 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 45 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 46 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 47 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 48 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 49 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 50 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 51 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 52 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 53 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 54 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 55 Unresolved
/tset/ANSI.os/streamio/scanf/T.scanf 56 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 2 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 3 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 4 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 5 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 6 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 7 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 8 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 9 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 10 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 11 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 12 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 13 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 14 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 15 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 16 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 17 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 18 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 19 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 20 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 21 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 22 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 23 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 24 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 25 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 26 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 27 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 28 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 29 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 30 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 31 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 32 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 33 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 34 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 35 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 36 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 37 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 38 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 39 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 40 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 41 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 42 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 43 Unresolved
/tset/ANSI.os/streamio/scanf_X/T.scanf_X 44 Unresolved
/tset/ANSI.os/streamio/ungetc/T.ungetc 1 Unresolved
A patch was issued by Geoff Clare to fix the failures
related to that interpretation request(vsx.015), and it was
to be installed on VSX 4.3.4.
However, the testcase above was never reported and, therefore, it was
never fixed by the patch. The patch was incorporated into VSX 4.3.5,
but again /tset/XPG4.os/wstreamio/ungetwc/T.ungetwc 1 was never
fixed.
We believe it is the same non-portable use of freopen() and should
either be fixed in the same way as for the others, or that a test
suite deficiency should be issued for this test case.Test Output
***********************************************************************
/tset/XPG4.os/wstreamio/ungetwc/T.ungetwc 1 Unresolved
Test Description:
When something has already been read from stream, ungetwc() returns
the value of the wide character c and inserts the multi-byte character
corresponding to c into the buffer associated with input stream, such
that the next read from the stream will return c. Reads from the
stream will return characters in the reverse order of their pushing.
Test Information:
deletion reason: freopen(./ungetwc-t, "r", stdin) failed - errno
113(EBADF)
*******************************************************************Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
It is agreed that this is a test suite fault and a waiver is recommended
on the grounds of a Test Suite Deficiency.
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:
- View Report 0233
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority