|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1389 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 1389.
Report 1389 Actions
Problem Report Number 1389 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0671 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1996-08-20 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 CAPIbase/setrlimit 19 Problem Summary TSD4U.00146 This test may fail on all implementations where RLIMIT_STACK is not enforced. Problem Text
base/setrlimit19, base/setrlimit20, base/setrlimit21,
--------------------------------------------------------------------
These test cases above fail on our system and seem to violate
the specification.
The specification states the following under setrlimit():
"The value RLIM_INFINITY, defined in <sys/resource.h>, is
considered to be larger than any other limit value. If a call
to getlimit() returns RLIM_INFINITY for a resource, it means
the implementation does not enforce limits on that resource."
On our system RLIM_INFINITY is returned by getrlimit() for
the resource RLIMIT_STACK.
The tests above are all expecting a SIGSEGV to be generated when
the stack is used up.
"Enforcing the limits" on the resource RLIMIT_STACK can ONLY
consist one of one possible action; sending
a SIGSEGV signal. The description of these enforcing actions
for RLIMIT_STACK are found in the section on RLIMIT_STACK:
"....The implentation will not automatically grow the stack beyond
this limit. If this limit is exceeded, SIGSEGV is generated for
the process. ..."
You can read in this section further however a full reading
seems to make clear that the ONLY enforcing action is to send
a SIGSEGV and of course not extend the available stack.
The meaning of non-enforcement means that no SIGSEGV is sent
and that the available stack may be enlarged where possible.
Now let's take a look at the test case:
if (getrlimit(RLIMIT_STACK, &setrlp) != 0) {
uwerrno("getrlimit");
exit(1);
}
if (setrlp.rlim_max != RLIM_INFINITY)
setrlp.rlim_max++;
if (setrlp.rlim_cur != RLIM_INFINITY)
setrlp.rlim_cur++;
tet_infoline("TEST: Set limits with setrlimit");
if (setrlimit(RLIMIT_STACK, &setrlp) == -1) {
tet_infoline("INFO: Raise failed");
if (setrlp.rlim_max != RLIM_INFINITY)
setrlp.rlim_max = save.rlim_max -1;
if (setrlp.rlim_cur != RLIM_INFINITY)
setrlp.rlim_cur = save.rlim_cur -1;
if (setrlimit(RLIMIT_STACK, &setrlp) == -1) {
tet_infoline("ERROR: Limit cannot be raised or l
tet_result(TET_UNRESOLVED);
exit(1);
}
tet_infoline("INFO: Lower succeeded");
}
else
tet_infoline("INFO: Raise succeeded");
tet_infoline("PREP: Get set to catch SIGSEGV on an alternate sta
if ((ss.ss_sp = (void *)malloc((size_t)SIGSTKSZ)) == NULL)
----------------------------------------------------------------------
Note that the message "Raise succeeded" in the test above even
if RLIMIT_STACK started out as RLIMIT_INFINITY and there was
in fact no lowering or raising of the limit even attempted.
The test suite then continues and sets up the alternate signal
stack, and the SIGSEGV alternate stack signal handler, but it never
checks to see if the implementation has RLIMIT_STACK set to
RLIMIT_INFINITY. It just trundles ahead and tries to capture
a SIGSEGV that should never occur if RLIMIT_STACK is RLIMIT_INFINITY.
Each test case above contains a description section that starts out
as follows:
If the implementation does not inhibit enforcement of limits for the
resource RLIMIT_STACK:
It appears that the tests are NOT checking for the above condition
before proceeding with their tests for SIGSEGV.Test Output
10|1704 /tset/CAPIbase/fsetrlimit/fsetrlimit19 15:48:59|TC Start, scenario
ef 111-1932
15|1704 1.10 1|TCM Start
400|1704 19 1 15:49:07|IC Start
200|1704 1 15:49:07|TP Start
520|1704 1 176226361 1 1|SPEC1170TESTSUITE CASE 19
520|1704 1 176226361 1 2|If the implementation does not inhibit enforcement of
520|1704 1 176226361 1 3|limits for the resource RLIMIT_STACK:
520|1704 1 176226361 1 4|When the size of the stack for the calling process
520|1704 1 176226361 1 5|would exceed the limit set by a call to int
520|1704 1 176226361 1 6|setrlimit(int resource, const struct rlimit *rlp) for
520|1704 1 176226361 1 7|resource RLIMIT_STACK the implementation shall not
520|1704 1 176226361 1 8|automatically grow the stack.
520|1704 1 557056017 1 1|PREP: Save the current stack limits
520|1704 1 557056017 1 2|TEST: Set limits with setrlimit
520|1704 1 557056017 1 3|INFO: Raise succeeded
520|1704 1 557056017 1 4|PREP: Get set to catch SIGSEGV on an alternate stack
520|1704 1 557056017 1 5|PREP: Call sigsetjmp() to save the environment
520|1704 1 557056017 1 6|PREP: Make the stack grow such that a SIGSEGV is
520|1704 1 557056017 1 7| generated. Awaiting return from siglongjmp()
520|1704 1 175898687 2 1|ERROR: process exited with signal 9
220|1704 1 2 15:52:33|UNRESOLVED
410|1704 19 1 15:52:33|IC End
80|1704 0 15:52:33|TC End
10|1705 /tset/CAPIbase/fsetrlimit/fsetrlimit20 15:52:33|TC Start, scenario
ef 111-1933
15|1705 1.10 1|TCM Start
400|1705 20 1 15:52:40|IC Start
200|1705 1 15:52:40|TP Start
520|1705 1 176291897 1 1|SPEC1170TESTSUITE CASE 20
520|1705 1 176291897 1 2|If the implementation does not inhibit enforcement of
520|1705 1 176291897 1 3|limits for the resource RLIMIT_STACK:
520|1705 1 176291897 1 4|When the size of the stack for the calling process
520|1705 1 176291897 1 5|exceeds the limit set by a call to int setrlimit(int
520|1705 1 176291897 1 6|resource, const struct rlimit *rlp) for resource
520|1705 1 176291897 1 7|RLIMIT_STACK the process shall receive a SIGSEGV
520|1705 1 176291897 1 8|signal.
520|1705 1 175964223 1 1|PREP: Save the current stack limits
520|1705 1 175964223 1 2|TEST: Set limits with setrlimit
520|1705 1 175964223 1 3|INFO: Raise succeeded
520|1705 1 175964223 1 4|PREP: Get set to catch SIGSEGV on an alternate stack
520|1705 1 175964223 1 5|TEST: Process receives SIGSEGV when the stack grows
520|1705 1 175964223 1 6| beyond the limit
520|1705 1 42663947 2 1|ERROR: wait_for: Timed-out waiting for child to exit.
220|1705 1 1 15:53:32|FAIL
410|1705 20 1 15:53:32|IC End
80|1705 0 15:53:33|TC End
10|1706 /tset/CAPIbase/fsetrlimit/fsetrlimit21 15:53:33|TC Start, scenario
ef 111-1934
15|1706 1.10 1|TCM Start
400|1706 21 1 15:53:39|IC Start
200|1706 1 15:53:39|TP Start
520|1706 1 176160831 1 1|SPEC1170TESTSUITE CASE 21
520|1706 1 176160831 1 2|If the implementation does not inhibit enforcement of
520|1706 1 176160831 1 3|limits for the resource RLIMIT_STACK:
520|1706 1 176160831 1 4|When the size of the stack for the calling process
520|1706 1 176160831 1 5|exceeds the limit set by a call to int setrlimit(int
520|1706 1 176160831 1 6|resource, const struct rlimit *rlp) for resource
520|1706 1 176160831 1 7|RLIMIT_STACK and the process is blocking or ignoring
520|1706 1 176160831 1 8|SIGSEGV, or is catching SIGSEGV and has not made
520|1706 1 176160831 1 9|arrangements to use an alternate stack, the
520|1706 1 176160831 1 10|disposition of SIGSEGV shall be set to SIG_DFL
efore
520|1706 1 176160831 1 11|it is generated.
520|1706 1 490930211 1 1|PREP: Obtain the current stack limits
520|1706 1 490930211 1 2|TEST: Set limits with setrlimit
520|1706 1 490930211 1 3|INFO: Raise succeeded
520|1706 1 490930211 1 4|PREP: Set up a signal handler for SIGSEGV
520|1706 1 490930211 1 5|TEST: The signal disposition was set to SIG_DFL
520|1706 1 490930211 1 6| before delivery
520|1706 1 289603653 2 1|ERROR: wait_for: Timed-out waiting for child to exit.
520|1706 1 289603653 2 2|ERROR: Process didn't terminate with SIGSEGV
220|1706 1 1 15:54:42|FAIL
410|1706 21 1 15:54:42|IC End
80|1706 0 15:54:43|TC EndReview 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:
- View Report 1389
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority