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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 0341 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 0341.


Report 0341 Actions


    Problem Report Number 0341
    Submitter's Classification Specification problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0057
    Raised 1997-01-28 08:00
    Updated 2003-03-13 08:00
    Published 1997-02-17 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.hdr/misc/shm 2
    Specification System Interfaces and Headers Issue 4
    Location in Spec See Problem Text
    Problem Summary PIN4.057 This is a FIP, rather than a failure, but it presents a matter to be resolved. WXSH4.2, on page 829, requires the shared memory segment size, shm_segsz in the structure shmid_ds to be of type int. We ...
    Problem Text
    This is a FIP, rather than a failure, but it presents a matter to be
    resolved.

    WXSH4.2, on page 829, requires the shared memory segment size,
    shm_segsz in the structure shmid_ds to be of type int. We declare it
    of type size_t, which resolves to an unsigned int, and the compiler
    delivers a warning.

    We believe that the choice of size_t is correct here for the following
    reasons:

    1. The shmget() function, XSH4.2 p. 543, declares "size" of type size_t
    in its prototype. This value is assigned to shm_segsz. The types required
    by the standard are inconsistent.

    2. This has been corrected in the draft for XPG5. Line 36140 of the new XSH
    casts shm_segsz to size_t.

    3. The choice of type int for shm_segsz limits the size of a shared memory segment
    in a manner the standard seems unlikely to have intended.
    Test Output
    200|714 2 00:50:25|TP Start
    520|714 2 10578 4 1|execution of test succeeded, but unexpected output was
    generated
    520|714 2 10578 4 2|Feature test macros: -D_XOPEN_SOURCE
    520|714 2 10578 4 3|C compiler return status: 0
    520|714 2 10578 4 4|Compiler or run-time messages or results:
    520|714 2 10578 4 5|"cc02es.c", line 44: warning: assignment type mismatch:
    520|714 2 10578 4 6| pointer to int "=" pointer to uint
    520|714 2 10578 7 1|execution of test succeeded, but unexpected output was
    generated
    520|714 2 10578 7 2|Feature test macros: -D_XOPEN_SOURCE -D_POSIX_SOURCE
    520|714 2 10578 7 3|C compiler return status: 0
    520|714 2 10578 7 4|Compiler or run-time messages or results:
    520|714 2 10578 7 5|"cc02es.c", line 44: warning: assignment type mismatch:
    520|714 2 10578 7 6| pointer to int "=" pointer to uint
    520|714 2 10578 10 1|execution of test succeeded, but unexpected output was
    generated
    520|714 2 10578 10 2|Feature test macros: -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=1
    520|714 2 10578 10 3|C compiler return status: 0
    520|714 2 10578 10 4|Compiler or run-time messages or results:
    520|714 2 10578 10 5|"cc02es.c", line 44: warning: assignment type mismatch:
    520|714 2 10578 10 6| pointer to int "=" pointer to uint
    520|714 2 10578 13 1|execution of test succeeded, but unexpected output was
    generated
    520|714 2 10578 13 2|Feature test macros: -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=2
    520|714 2 10578 13 3|C compiler return status: 0
    520|714 2 10578 13 4|Compiler or run-time messages or results:
    520|714 2 10578 13 5|"cc02es.c", line 44: warning: assignment type mismatch:
    520|714 2 10578 13 6| pointer to int "=" pointer to uint
    520|714 2 10578 16 1|execution of test succeeded, but unexpected output was
    generated
    520|714 2 10578 16 2|Feature test macros: -D_XOPEN_SOURCE -D_POSIX_SOURCE
    -D_POSIX_C_SOURCE=1
    520|714 2 10578 16 3|C compiler return status: 0
    520|714 2 10578 16 4|Compiler or run-time messages or results:
    520|714 2 10578 16 5|"cc02es.c", line 44: warning: assignment type mismatch:
    520|714 2 10578 16 6| pointer to int "=" pointer to uint
    520|714 2 10578 19 1|execution of test succeeded, but unexpected output was
    generated
    520|714 2 10578 19 2|Feature test macros: -D_XOPEN_SOURCE -D_POSIX_SOURCE
    -D_POSIX_C_SOURCE=2
    520|714 2 10578 19 3|C compiler return status: 0
    520|714 2 10578 19 4|Compiler or run-time messages or results:
    520|714 2 10578 19 5|"cc02es.c", line 44: warning: assignment type mismatch:
    520|714 2 10578 19 6| pointer to int "=" pointer to uint
    220|714 2 102 00:50:28|FIP

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    The request correctly identifies that while the result is an FIP, the
    information provided gas located a difference between the system under
    test and the XSH 4 specification. For this reason it is necessary for
    an interpretation to be requested.

    The system under test is aligned with the current draft of the XSH5
    specifications and this suggests that the cahnge from int to size_t
    is supported by later specifications. It is also recognised that the
    effect of this change is to increase the potential size of a shared
    memory segment from 2Gb to 4Gb, and it is unlikely that applications
    are using shared memory segments of a size greater than 2Gb. There
    is no significance attached to a negative value being present in this
    field and the use of an unsigned quantity should not affect the usage
    of this structure element by a conforming application.

    It is recommended that a Permanent Interpretation is granted on the grounds
    that a future direction is being followed and that applications should not
    be affected by this change.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Permanent Interpretation (PIN)
    Review Conclusion
    A Permanent Interepretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority