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...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

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 #1107 of 1198 |
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


Mon Jun 23, 2008 9:07 pm

falsedrow
Offline Offline
Send Email Send Email

Attachment:
mpatrol-recursion.patch
Type:
text/x-diff
Forward
Message #1107 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