|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1372 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 1372.
Report 1372 Actions
Problem Report Number 1372 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0654 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1996-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 4.1.0 Test Identification Base/makecontext,setcontext 1 Problem Summary TSD4U.00163 This test may fail on implementations where the stack grows down rather than up. Problem Text
These test fail because of an assumption as to which direction the stack will
grow.
We implement makecontext() with the assumption that the stack starts from
the high address. These tests allocate the stack (via malloc()) at the
low address, assuming that the stack grows down rather than up. The failure
(SIGSEGV) occurs when the buffer pointed to by the environ variable gets
corrupted by the call to makecontext(). A subsequent call to getenv() (for
updating the VSU journal file) then results in the SIGSEGV failure due to this
corruption.
The tests should not be making assumptions as to which direction the stack grows.
In our review of the specification, we can find no case where this is defined.
In order to correct the tests and make it portable across a number implementations,
the tests should position it's stack base at the middle of the buffer it allocates.
This will allow for stack growth in either direction.Test Output
TEST CASE: makecontext
TEST PURPOSE #1
A successful call to void makecontext(uncontext_t
*ucp, (void *func)(), int argc, ...) shall modify the
context specified by ucp so that when this context is
resumed using swapcontext() or setcontext() program
execution shall continue by calling the function
func(), passing it the arguments that follow argc.
TEST: makecontext() modifies context specified by ucp
PREP: Generate a new context
PREP: Allocate stack space
TEST: Call makecontext
TEST: Execution continues with func after setcontext()
TEST: Parameters passed correctly after setcontext
PREP: Generate another new context
PREP: Allocate stack space
TEST: Call makecontext
TEST: Execution continues with func after swapcontext()
TEST: Parameters passed correctly after swapcontext
CLEANUP: Set original context
ERROR: TEST TERMINATED DUE TO SIGSEGV SIGNAL (11)
1 FAIL
TEST CASE: setcontext
TEST PURPOSE #1
A successful call to int setcontext(ucontext_t *ucp)
when ucp is created with makecontext() shall continue
program execution with the function passed to
makecontext() and when that function returns the
process shall continue as if after a call to
setcontext() with the ucp argument that was input to
makecontext().
PREP: Set atexit for premature exits
PREP: Save first context
PREP: Save second context
PREP: Allocate stack space for second context
PREP: Set second context's link to first context
PREP: Allocate stack space for first context
PREP: Call makecontext to modify second context
TEST: Call setcontext with modified second context
TEST: Parameters passed to function after setcontext
INFO: Exiting function
TEST: First context reentered after function
ERROR: TEST TERMINATED DUE TO SIGSEGV SIGNAL (11)
1 FAILReview 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 1372
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority