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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1563 Actions


    Problem Report Number 1563
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0845
    Raised 2001-10-30 08:00
    Updated 2003-03-13 08:00
    Published 2001-11-01 08:00
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.1.2
    Test Identification CAPI.os/procprim/sigaltsta 6
    Problem Summary TSD4U.00306 An EINVAL error may occur due to uninitialised data in the stack_t structure.
    Problem Text
    On page 554 of the 'Systems Interfaces and Headers' Specification for sigaltstack( ), it specifies that for the EINVAL errno:
    "The ss argument is not a null pointer, and the ss_flags member pointed to by ss contains flags other than SS_DISABLE.

    In this case, there is garbage in the ss structure because it is not zeroed out prior to use. The section of code appears below:
    static void
    sh_6A(int i)
    {
    stack_t ss;
    int ret;

    sig_rcvd++;

    ss.ss_size = SIGSTKSZ*2;
    errno=0;

    tet_infoline("TEST: Call sigaltstack(ss, NULL) with different size");
    if((ret=sigaltstack(&ss,NULL)) != -1 || errno != EPERM){
    tet_infoline("ERROR: sigalstack() failed");
    sprintf(ebuf," Returned %d with errno = %s,Expected -1 with errno = EPERM",ret,err_lookup(errno));
    tet_infoline(ebuf);
    tet_result(TET_FAIL);
    }

    So, only the ss.ss_size field is assigned a value, and ss_flags is not cleared in this local structure. By adding the following before the ss.ss_size
    assignment,
    the test case now PASSes:
    memset(&ss, 0, sizeof(ss));
    Test Output
    1 10:57:42|IC Start
    10:57:42|TP Start
    00033620052 1 1|PREP: Call sigaltstack(ss, NULL)
    00033620052 1 2|PREP: sigaction() called with SA_ONSTACK set
    00033620052 1 3|PREP: Call sigaltstack(NULL,oss) to verify SS_ONSTACK set
    00033620052 1 4|PREP: Send self SIGTERM
    00033620052 1 5|TEST: Ensure sig_hdlr was entered
    00033620052 1 6|TEST: Call sigaltstack(ss, NULL) with different size
    00033620052 1 7|ERROR: sigalstack() failed
    00033620052 1 8| Returned -1 with errno = 121(EINVAL - Invalid argument), Expected -1 with errno = EPERM
    1 10:57:42|FAIL
    1 10:57:42|IC End

    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