From owner-freebsd-hackers Fri May 9 16:28:57 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA05539 for hackers-outgoing; Fri, 9 May 1997 16:28:57 -0700 (PDT) Received: from wolfenet.com (news1.wolfe.net [204.157.98.9]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA05532 for ; Fri, 9 May 1997 16:28:54 -0700 (PDT) Received: from gonzo.wolfenet.com (moore@gonzo.wolfenet.com [204.157.98.2]) by wolfenet.com (8.8.5/8.8.5) with ESMTP id QAA14270 for ; Fri, 9 May 1997 16:30:06 -0700 (PDT) Received: (from moore@localhost) by gonzo.wolfenet.com (8.8.3/8.7) id QAA24652; Fri, 9 May 1997 16:28:53 -0700 (PDT) Date: Fri, 9 May 1997 16:28:53 -0700 (PDT) Message-Id: <199705092328.QAA24652@gonzo.wolfenet.com> From: Timothy Moore To: freebsd-hackers@FreeBSD.ORG In-reply-to: <199705092251.PAA05670@rah.star-gate.com> (message from Amancio Hasty on Fri, 09 May 1997 15:51:51 -0700) Subject: Re: g++ shared library segfaults Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Date: Fri, 09 May 1997 15:51:51 -0700 From: Amancio Hasty Hi, I traced it further more and it looks like a bug in Docviewer.c using an illegal reference to a local variable. for (long i = 0; i < count; ++i) { ViewerColorInfo& info = _color_info->item_ref(i); if (strcmp(info._name, name) == 0) { break; } } later on it checks the value of i. I change the scope of i and doc just fired right up. Will "fix" similar referencs in doc. Uh, that's not an illegal reference. The scope of i extends to the end of the containing block, not the end of the "for" statement. Tim