From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14653 invoked by alias); 10 May 2006 20:39:09 -0000 Received: (qmail 14645 invoked by uid 22791); 10 May 2006 20:39:08 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 May 2006 20:39:07 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4AKd5Bg007190 for ; Wed, 10 May 2006 16:39:05 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4AKd5kA011678 for ; Wed, 10 May 2006 16:39:05 -0400 Received: from [172.16.14.227] (IDENT:m71zP/BnDe/NkyLpJERRK4/T5ACn+9Fj@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k4AKd4Ac007564 for ; Wed, 10 May 2006 16:39:04 -0400 Message-ID: <44624F68.5080303@redhat.com> Date: Wed, 10 May 2006 20:39:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch][commit] Fix Small Bug in Dynamic Configuration Content-Type: multipart/mixed; boundary="------------060502050804050000050201" X-IsSubscribed: yes Mailing-List: contact sid-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00020.txt.bz2 This is a multi-part message in MIME format. --------------060502050804050000050201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 366 Hi, I've committed the attached patch which fixes a small problem in the tracking of the call stack during dynamic configuration. In function_jump_pin_handler, if the target function is already on the top of the stack, then it is a local branch. This code is not used by any public ports yet, but the bug was exposed by an internal port here at Red Hat. Dave --------------060502050804050000050201 Content-Type: text/plain; name="sid-dynamic-config.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-dynamic-config.ChangeLog" Content-length: 171 2006-05-10 Dave Brolley * compConfig.cxx (function_jump_pin_handler): Assume a local branch if the function is already on the top of the stack. --------------060502050804050000050201 Content-Type: text/plain; name="sid-dynamic-config.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-dynamic-config.patch.txt" Content-length: 1425 Index: sid/component/cfgroot/compConfig.cxx =================================================================== RCS file: /cvs/cvsfiles/devo/sid/component/cfgroot/compConfig.cxx,v retrieving revision 1.86 diff -c -p -r1.86 compConfig.cxx *** sid/component/cfgroot/compConfig.cxx 12 Mar 2006 20:56:23 -0000 1.86 --- sid/component/cfgroot/compConfig.cxx 5 May 2006 22:55:47 -0000 *************** dynamic_configurator_component::function *** 1613,1620 **** function_address_pin.drive (addr); string function = loader->attribute_value("current-function"); ! // If the current function is on the stack, then assume we're ! // returning to it, otherwise assume we're calling it. for (vector < pair >::const_iterator it = config_stack.begin (); it != config_stack.end (); ++it) --- 1613,1626 ---- function_address_pin.drive (addr); string function = loader->attribute_value("current-function"); ! // If the current function is on top of the stack, then assume ! // a local branch. ! assert (config_stack.size () >= 1); ! if (config_stack.back ().first == function) ! return; ! ! // Otherwise, if the current function is not on the stack, then assume we're ! // calling it. Otherwise assume we're returning to it. for (vector < pair >::const_iterator it = config_stack.begin (); it != config_stack.end (); ++it) --------------060502050804050000050201--