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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1417 Actions


    Problem Report Number 1417
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0699
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1996-03-18 08:00
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.1.0
    Test Identification base/setrlimit 11
    Problem Summary TSD4U.00116 This test may fail on implementations because the number of bytes malloc'ed is less that the rlim_cur value set by the test.
    Problem Text
    This test may fail on implementations because the number of bytes
    malloc'ed is less that the rlim_cur value set by the test.

    The test executes the following

    while (sbrk(pgsz) != (void *)-1)
    total_avail += pgsz;

    resulting in total_avail = 134131712 and then executes the following:

    if (setrlp.rlim_max != RLIM_INFINITY)
    setrlp.rlim_max++;
    if (setrlp.rlim_cur != RLIM_INFINITY)
    setrlp.rlim_cur++;

    which results in setrlp.rlim_cur = 134217729 and
    setrlp.rlim_max = 2147483647 ;

    The malloc tests executes the following call to malloc():

    if (malloc((size_t)(total_avail+3*pgsz)) != (void *)NULL)

    total_avail + 3*pgsz = 134131712 + 3*4096 = 134144000

    For this malloc() to fail and the test to pass the following must be
    true; rlimit_cur < total_avail+3*pgsz. But from the numbers above
    rlimit_cur > total_avail+3*pgsz i.e. 134217729 > 134144000.

    Page 64 of the XPG4 V2 XSH states the following:

    "The behavior of brk() and sbrk() is unspecified if an application
    also uses any other memory functions (such as malloc(),...). Other
    functions may use these other memory functions silently."

    and

    "It is unspecified whether the pointer returned by sbrk() is aligned
    suitably for any purpose."

    This .c file contains calls to both malloc() and sbrk(), which is a clear
    violation of the spec. The value of total_avail can not be calculated
    this way. This seems to be an overly complex test, why not just use
    rlim_cur+1 in both testcases. In any event the sbrk() and malloc() test
    will have to be seperated into their own .c files.
    Test Output
    TEST PURPOSE #11
    If the implementation does not inhibit enforcement of
    limits for the resource RLIMIT_DATA:
    When the data segment size of the calling process
    exceeds the limit set by a call to int setrlimit(int
    resource, const struct rlimit *rlp) for resource
    RLIMIT_DATA brk(), malloc(), and sbrk() shall fail and
    set errno to ENOMEM.
    PREP: Check if the limits are enforced
    PREP: Obtain the system page size by call to
    sysconf(_SC_PAGESIZE)
    TEST: Set limits with setrlimit
    INFO: Raise succeeded
    TEST: When break value exceeds the limit sbrk()
    fails and sets errno to ENOMEM
    TEST: When break value exceeds the limit malloc()
    fails and sets errno to ENOMEM
    ERROR: Call to malloc() did not fail when the break
    value was exceeded
    11 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We agree this is a test suite deficiency in the test
    suite version(s) listed.

    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