From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15178 invoked by alias); 21 Jan 2003 00:53:01 -0000 Mailing-List: contact insight-prs-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-prs-owner@sources.redhat.com Received: (qmail 15124 invoked by uid 71); 21 Jan 2003 00:53:01 -0000 Resent-Date: 21 Jan 2003 00:53:01 -0000 Resent-Message-ID: <20030121005301.15122.qmail@sources.redhat.com> Resent-From: insight-gnats@sources.redhat.com (GNATS Filer) Resent-Cc: insight-prs@sources.redhat.com Resent-Reply-To: insight-gnats@sources.redhat.com, llewins@raytheon.com Received: (qmail 21138 invoked by uid 48); 21 Jan 2003 00:45:03 -0000 Message-Id: <20030121004503.21137.qmail@sources.redhat.com> Date: Tue, 21 Jan 2003 00:53:00 -0000 From: llewins@raytheon.com Reply-To: llewins@raytheon.com To: insight-gnats@sources.redhat.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: insight/206: SEGV in Tcl_FindCommand X-SW-Source: 2003-q1/txt/msg00014.txt.bz2 List-Id: >Number: 206 >Category: insight >Synopsis: SEGV in Tcl_FindCommand >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Jan 21 00:53:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Lloyd J. Lewins >Release: GNU gdb 2003-01-09-cvs >Organization: >Environment: cygwin >Description: Compiled wih gcc: gcc version 2.95.3-5 (cygwin special) Using Insite cvs January 9: GNU gdb 2003-01-09-cvs Upon examining variable b, receive the following SEGV: Program received signal SIGSEGV, Segmentation fault. 0x6603b620 in Tcl_FindCommand (interp=0xa032b48, name=0xa492160 "namespace", contextNsPtr=0x0, flags=0) at ../../../src/tcl/win/../generic/tclNamesp.c:1970 1970 if (cxtNsPtr->cmdResProc != NULL || iPtr->resolverPtr != NULL) { >How-To-Repeat: set break point at line 170, and run. Click on variable b and add to watch. In watch, browse into b->classC->private. Watch window fails to update correctly, and goes to back. Click watch window to bring to front to generate SEGV. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="main.cc" Content-Disposition: inline; filename="main.cc" /* Submitted by L.J.Lewins, llewins@raytheon.com Compiled wih gcc: gcc version 2.95.3-5 (cygwin special) Using Insite cvs January 9: GNU gdb 2003-01-09-cvs Upon examining variable b, receive the following SEGV: Program received signal SIGSEGV, Segmentation fault. 0x6603b620 in Tcl_FindCommand (interp=0xa032b48, name=0xa492160 "namespace", contextNsPtr=0x0, flags=0) at ../../../src/tcl/win/../generic/tclNamesp.c:1970 1970 if (cxtNsPtr->cmdResProc != NULL || iPtr->resolverPtr != NULL) { Reproduce: set break point at line 170, and run. Click on variable b and add to watch. In watch, browse into b->classC->private. Watch window fails to update correctly, and goes to back. Click watch window to bring to front to generate SEGV. */ #include using namespace std; class containerClass { public: class classB; public: containerClass (void) { } class classA { public: classA(const unsigned num) : valV (num) { } classB* find(const unsigned val) const { return 0; } virtual unsigned val(void) { return valV; } protected: const unsigned valV; string nameV; private: // disallow default/copy constructor and assignment operator classA(void); classA(classA& source); classA& operator=(const classA& rhs); friend class containerClass; friend class classB; }; class classC { public: classC (classA& myClassA) : nameV("foo"), myClassAV (myClassA) { } classA& myClassA (void) const { return myClassAV; } protected: string nameV; private: classA& myClassAV; // disallow defau;t/copy constructor and assignment operator classC(void); classC(classC& source); classC& operator=(const classC& rhs); }; class classB : virtual public classC { public: classB(classA& myClassA) : classC(myClassA), valV(0) { } virtual unsigned val(void) { return valV; } protected: unsigned valV; private: // disallow defaut/copy constructor and assignment operator classB (void); classB (classB& source); classB& operator= (const classB& rhs); }; private: // disallow copy constructor and assignment operator containerClass (containerClass& source); containerClass& operator= (const containerClass& rhs); friend class classA; }; class classB; class classA : public containerClass::classA { public: classA(const unsigned num) : containerClass::classA(num) { } classB* find(const unsigned val) const { return 0; } private: // disallow copy constructor and assignment operator classA(classA& source); classA& operator=(const classA& rhs); }; class classB : public containerClass::classB { public: classB(containerClass::classA& myClassA) : classC(myClassA), containerClass::classB(myClassA), reservedV(false) { } protected: bool reservedV; private: // disallow copy constructor and assignment operator classB(classB& source); classB& operator=(const classB& rhs); }; int main(void) { classA* a = new classA(0); classB* b = new classB(*a); }