public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: sid@sources.redhat.com
Subject: [patch][commit] Fix Small Bug in Dynamic Configuration
Date: Wed, 10 May 2006 20:39:00 -0000	[thread overview]
Message-ID: <44624F68.5080303@redhat.com> (raw)

[-- 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)

                 reply	other threads:[~2006-05-10 20:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44624F68.5080303@redhat.com \
    --to=brolley@redhat.com \
    --cc=sid@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).