Search the web
Sign In
New User? Sign Up
mpatrol · mpatrol library discussion group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Stop mpatrol recursing in checkalloca   Message List  
Reply | Forward Message #1108 of 1198 |
RE: [mpatrol] Stop mpatrol recursing in checkalloca

Hi Daniel,

 

[Sorry for not responding earlier – I’ve been on holiday for the last few weeks]

 

Thanks for providing your patch and for all your work getting mpatrol to work with libunwind.  Hopefully this will help more people use libunwind and mpatrol together.

 

I had originally hoped to do a new update release for mpatrol last year, but the birth of our son last September meant that any free time I hoped to have had will now get postponed for another 10 years ;-)  So, I’ve revised what I originally wanted to do for the release into simply getting my latest sources put into CVS on SourceForge so that people can access the latest version with some patches added and also add their own patches.  That way, even if a new release doesn’t come for another few years, it’ll still be possible to get the latest sources with people’s updates.  I’ll try and get that done in the next few weeks and post a message here when it’s done.

 

Thanks again,

 

Graeme.

 


From: mpatrol@yahoogroups.com [mailto:mpatrol@yahoogroups.com] On Behalf Of Daniel Jacobowitz
Sent: 23 June 2008 22:08
To: mpatrol@yahoogroups.com
Subject: [mpatrol] Stop mpatrol recursing in checkalloca

 

Here's a patch which stops a couple of crashes we encountered in
alloca checking. The failures were brought on by using libunwind with
the included test16 test case, but are not specific to libunwind.

The test causes infinite recursion on ARM. One of several places was
in __mp_getaddrs, which highlighted the fact that this routine
unnecessarily copies the stackinfo; the copy has been moved to where
it is necessary. Libunwind's stackinfo is unfortunately quite large
because we need to save the unwind cursor; it's big enough that the
compiler generates a call to memcpy.

Also discovered during debugging, checkalloca can crash if unwinding
failed for one of the mentioned frames. This happened in my case
because libunwind refuses to invoke recursively while in mid-unwind.

The final fix for the bug is the memhead.recur check in checkalloca.
The check can always wait until we return to user code. This is the
bit that makes calls to memcpy inside mpatrol, including
compiler-generated ones like for stackinfo above, not lead to an
infinitely deep stack.

Again, hope this is useful!

(Just curious: do you expect there will be another release of mpatrol
in the foreseeable future?)

--
Daniel Jacobowitz
CodeSourcery



Thu Jul 3, 2008 10:15 am

graemeroy
Offline Offline
Send Email Send Email

Forward
Message #1108 of 1198 |
Expand Messages Author Sort by Date

Here's a patch which stops a couple of crashes we encountered in alloca checking. The failures were brought on by using libunwind with the included test16...
Daniel Jacobowitz
falsedrow
Offline Send Email
Jun 24, 2008
8:22 am

Hi Daniel, [Sorry for not responding earlier - I've been on holiday for the last few weeks] Thanks for providing your patch and for all your work getting...
Graeme Roy
graemeroy
Offline Send Email
Jul 3, 2008
10:16 am

... Congratulations, and thanks - that sounds great. -- Daniel Jacobowitz CodeSourcery...
Daniel Jacobowitz
falsedrow
Offline Send Email
Jul 3, 2008
12:28 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help