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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1536 Actions


    Problem Report Number 1536
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0818
    Raised 2000-01-20 08:00
    Updated 2003-03-13 08:00
    Published 2000-01-26 08:00
    Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98)
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.0.4
    Test Identification base/mmap 41
    Problem Summary TSD4U.00279 The test does not properly ensure that the offset passed to mmap() is a multiple of the page size.
    Problem Text

    /tset/CAPIbase/fmmap/t41lrgoff.c is calculating an offset using floating
    point:

    #define MAXOFF_VAL(x) pow((double)2, (double)((x*8)-1))-1

    offset = (off_t)(((MAXOFF_VAL(small_offt))/pgsz)*pgsz+pgsz);

    The division of the double by the integer causes a truncation error,
    and the offset becomes 2147491839, which is not a multiple of the page
    size. Error 22 in our implementation is EINVAL, the error specified for
    this exception by XSH5, p. 528.

    The test passes if MAXOFF_VAL is correctly cast to off_t:

    offset =
    (off_t)(((off_t)(MAXOFF_VAL(small_offt))/pgsz)*pgsz+pgsz);

    Test Output

    TEST CASE: mmap

    TEST PURPOSE #41
    EOVERFLOW in errno and return MAP_FAILED on a call to
    void *mmap(void *addr, size_t len, int prot, int
    flags, int fildes, off_t off) when file is a regular
    file and the value of off plus len exceeds the offset
    maximum established in the open file description
    associated with fildes.
    PREP: Check for existence of programming environments
    PREP: Obtain off_t size in XBS5_ILP32_OFF32 environment
    PREP: Obtain off_t size in XBS5_ILP32_OFFBIG environment
    INFO: Execution environment for XBS5_LP64_OFF64 not supported
    INFO: Execution environment for XBS5_LPBIG_OFFBIG not supported
    TEST: Execute a program compiled in XBS5_ILP32_OFF32(32-bit off_t)
    environment that:
    opens a regular file for writing
    execs a program compiled in XBS5_ILP32_OFFBIG(64-bit off_t)
    environment,
    passing it the open file descriptor
    this program:
    verifies mmap returns -1 and sets errno to
    EOVERFLOW when off+len exceeds the offset maximum
    ERROR: In LFS program: errno set incorrectly. Expected: EOVERFLOW (79),
    Received: 22
    41 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This is accepted as a fault in the test suite.

    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