|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1776 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 1776.
Report 1776 Actions
Problem Report Number 1776 Submitter's Classification Specification problem State Resolved Resolution Temporary Interpretation (TIN) Problem Resolution ID TIN.X.0075 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1998-04-17 08:00 Product Standard Window System Application Interface V2 Certification Program The Open Brand certification program Test Suite VSW version 5.0.0 Test Identification Xt11/XtVaSetSubvalues 4 Specification Window Management (X11R5): X Toolkit Intrinsics Location in Spec See Problem Text Problem Summary TIN4W.00007 A non-alignment between the reference code and its specification is under investigation. Problem Text
The reference implementation (i.e. The X11 code provided by TOG) being
tested is not in line with the standard specification for this X11
function as defined in the "X Toolkit Intrinsics - C Language
Interface".
The assertion being tested is in line with the standard specification
but the behavior of this function is not in line with the specification.
Either the X11 reference implementation is at fault, or the
Specification needs to be aligned with the reference implemenation. It
is our understanding that X11R6.1 is no longer supported by TOG,
hence we request this waiver be granted a Permanent Interpretation.
The SIGSEGV is a result of a NULL widget being passed to XtParent().
The sample code below will show the sequence of calls that lead up
to the SIGSEGV.
static void t004(){
.
.
.
XtVaSetSubvalues(&base, resources, 2, XtVaNestedList, sublist,
XtNlabel, "Hello World", (char *)NULL, 0);
.
.
.
}
----------------------------------------------------------------
FILE: Xt/VarCreate.c
XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal
num_resource
s, ...)
{
.
.
.
/* _XtVaToArgList() is called with a NULL widget */
_XtVaToArgList((Widget)NULL, var, total_count, &args, &num_args);
.
.
.
}
---------------------------------------------------------------
FILE: Xt/VarArgs.c
void
_XtVaToArgList(widget, var, max_count, args_return, num_args_return)
Widget widget; <-- NULL widget passed from
XtVaSetSubvalues
va_list var;
int max_count;
ArgList *args_return;
Cardinal *num_args_return;
{
String attr;
int count;
ArgList args = (ArgList)NULL;
XtTypedArg typed_arg;
XtResourceList resources = (XtResourceList)NULL;
Cardinal num_resources;
Boolean fetched_resource_list = False;
<-- fetched_resource_list set to False
if (max_count == 0) {
*num_args_return = 0;
*args_return = (ArgList)NULL;
return;
}
max_count *= 2;
args = (ArgList)XtMalloc((unsigned)(max_count * sizeof(Arg)));
for (count = max_count; --count >= 0; )
args[count].value = (XtArgVal) NULL;
max_count /= 2;
count = 0;
for(attr = va_arg(var, String) ; attr != NULL;
attr = va_arg(var, String)) {
if (strcmp(attr, XtVaTypedArg) == 0) {
typed_arg.name = va_arg(var, String);
typed_arg.type = va_arg(var, String);
typed_arg.value = va_arg(var, XtArgVal);
typed_arg.size = va_arg(var, int);
/* if widget is NULL, typed args are ignored */
if (widget != NULL) {
if (!fetched_resource_list) {
GetResources(widget, &resources, &num_resources);
fetched_resource_list = True;
}
count += _XtTypedArgToArg(widget, &typed_arg,
&args[count],
resources, num_resources,
&args[max_count + count]);
}
} else if (strcmp(attr, XtVaNestedList) == 0) {
/*
* Since "!fetch_resource_list" is True then the "if"
* statement evaluates to True even though "widget" is
* NULL.
*/
if (widget != NULL || !fetched_resource_list) {
/*
* The NULL widget is passed to GetResources() where
* GetResources() attempts to do an XtParent(widget).
* Since widget is NULL it results in a SIGSEGV.
*/
GetResources(widget, &resources, &num_resources);
.
.
.
}
.
.
.
}
The "||" in "if (widget != NULL || !fetched_resource_list)" in the
function
_XtVaToArgList() should probably be changed to "&&" to prevent a NULL
widget from being passed to GetResources().
---------------------------------------------------------------
FILE Xt/VarArgs.c
static void
GetResources(widget, res_list, number)
Widget widget;
XtResourceList * res_list;
Cardinal * number;
{
Widget parent = XtParent(widget); <-- XtParent() called with NULL
widget.
.
.
.
}
A SIGSEGV results from calling XtParent() with a NULL widget.Test Output
520|2704 4 7282 1 1|VSW5TESTSUITE PURPOSE 4
520|2704 4 7282 1 2|Assertion XtVaSetSubvalues-4.(A)
520|2704 4 7282 1 3|On a call to void XtVaSetSubvalues(base, resources,
520|2704 4 7282 1 4|num_resources,...) when the name XtVaNestedList is
520|2704 4 7282 1 5|specified in place of a resource name in the variable
520|2704 4 7282 1 6|argument list the next argument shall be interpreted as a
520|2704 4 7282 1 7|value specifying another varargs style variable argument
520|2704 4 7282 1 8|list which shall be logically inserted into the original
520|2704 4 7282 1 9|list at the point of declaration.
520|2704 4 7262 1 1|PREP: Initialize toolkit, Open display and Create topLevel
root widget
520|2704 4 7262 1 2|PREP: Create windows for widgets and map them
520|2704 4 7262 1 3|PREP: Initialize the base address
520|2704 4 7262 1 4|PREP: Create nested list
520|2704 4 7262 1 5|PREP: Set subvalues
520|2704 4 7262 1 6|unexpected signal 11 (SIGSEGV) received
220|2704 4 2 16:00:10|UNRESOLVED
410|2704 4 1 16:00:10|IC End
80|2704 0 16:00:10|TC End
300|2705 /tset/Xt11/tvastsvls/Test 16:00:10|Clean Start, scenario ref
118-137
320|2705 0 16:00:11|Clean EndReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
A non-alignment between the reference code and its specification is
under investigation. Thus it is recommended that a Temporary
Interpretation be granted for this test while it remains subject to review.
If a change to the specification results from the conclusion of this
investigation, then this Temporary Interpretation will be converted
to a Permanent Waiver. Otherwise this Temporary Interpretation will
be converted to a Temporary Waiver (Minor System Fault).
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Temporary Interpretation (TIN) Review Conclusion
A Temporary Interpretation is granted.
Problem Reporting System Options:
- View Report 1776
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority