|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1785 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 1785.
Report 1785 Actions
Problem Report Number 1785 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0862 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1999-04-06 08:00 Product Standard Window System Application Interface V2 Certification Program The Open Brand certification program Test Suite VSW version 5.0.2 Test Identification Xt11/XtAppReleaseCacheRefs 2 Problem Summary TSD4W.00164 This test may fail on implementations because stack memory is being freed. Problem Text
XtAppReleaseCacheRefs calls XtFree on memory that is
on the stack (in lib/Xt/Convert.c:FreeCacheRec).
XtAppReleaseCacheRefs contains the following code to
define destructor:
void XtDES_Proc(app_ctext, to_val, converter_data, args, num_args )
XtAppContext app_ctext;
XrmValue *to_val;
XtPointer converter_data;
XrmValue *args;
Cardinal *num_args;
{
avs_set_event(2,avs_get_event(2)+1);
XtFree((void *) to_val);
}
X11R6 lib/Xt/Convert.c contains this code that calls the destructor:
static void FreeCacheRec(app, p, prev)
XtAppContext app;
CachePtr p;
CachePtr *prev;
{
LOCK_PROCESS;
if (p->has_ext) {
if (CEXT(p)->destructor) {
Cardinal num_args = p->num_args;
XrmValue *args = NULL;
XrmValue toc;
if (num_args)
args = CARGS(p);
toc.size = p->to.size;
if (p->to_is_value)
toc.addr = (XPointer)&p->to.addr;
else
toc.addr = p->to.addr;
(*CEXT(p)->destructor) (app, &toc, CEXT(p)->closure, args,
&num_args);
}
Notice that to_val in XtDES_proc is &toc in FreeCacheRec which is
a value on the stack not a value that had been previously allocated
with XtMalloc().
As an aside, there is no need for a destructor given the convertor
provided since it returns a pointer to static memory and also should
not be XtFree()'ed.
Test Output
TEST CASE: XtAppReleaseCacheRefs
TEST PURPOSE #2
Assertion XtAppReleaseCacheRefs-2.(A)
A successful call to void
XtAppReleaseCacheRefs(app_context, refs) shall call the
destructor procedure and remove the resource from the
conversion cache for any conversion entry in refs that
reaches a conversion count of zero.
PREP: Initialize toolkit, Open display and Create topLevel root widget
PREP: Create windows for widgets and map them
TEST: Register resource converter and destructor
TEST: Invoke resource converter twice
TEST: Resource converter was invoked
TEST: Release the cached resource value
TEST: Release the cached resource value again
unexpected signal 11 (SIGSEGV) received
2 UNRESOLVED
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:
- View Report 1785
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority