public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* [patch][commit] Fix Small Bug in Dynamic Configuration
@ 2006-05-10 20:39 Dave Brolley
  0 siblings, 0 replies; only message in thread
From: Dave Brolley @ 2006-05-10 20:39 UTC (permalink / raw)
  To: sid

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

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

[-- Attachment #2: sid-dynamic-config.ChangeLog --]
[-- Type: text/plain, Size: 171 bytes --]

2006-05-10  Dave Brolley  <brolley@redhat.com>

	* compConfig.cxx (function_jump_pin_handler): Assume a local branch if
	the function is already on the top of the stack.


[-- Attachment #3: sid-dynamic-config.patch.txt --]
[-- Type: text/plain, Size: 1425 bytes --]

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<string,unsigned> >::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<string,unsigned> >::const_iterator it = config_stack.begin ();
         it != config_stack.end ();
         ++it)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-10 20:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-10 20:39 [patch][commit] Fix Small Bug in Dynamic Configuration Dave Brolley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).