• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Diagnosing corrupted stacks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Diagnosing corrupted stacks


  • Subject: Re: Diagnosing corrupted stacks
  • From: Michael Crawford <email@hidden>
  • Date: Wed, 29 Apr 2009 20:12:53 -0700

Try checksumming some of your stack variables - but just the ones that
you know shouldn't change.  If you pass a non-const pointer or
reference to a stack variable, then that's likely to change, but those
that aren't passed, or only passed as const, would qualify.

There's probably some way to do this in a harmonious fashion, such as
a registration function that takes the address and sizes of areas to
checksum.  Then you can add most of your local variables within each
function call, and de-register them just before that function returns.

At first call the function that actually does the checksumming at the
beginning and return of each function.  If you can find a checksum
failure in a particular function, then do a binary search within that
function.

It will be a little more tricky if a different thread is overwriting
your stack, but this method should still work in principle.

Mike
--
Michael David Crawford
mdcrawford at gmail dot com

   GoingWare's Bag of Programming Tricks
      http://www.goingware.com/tips/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Diagnosing corrupted stacks (From: Thomas McHale <email@hidden>)
 >Re: Diagnosing corrupted stacks (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Xcode could not locate source file
  • Next by Date: Re: Diagnosing corrupted stacks
  • Previous by thread: Re: Diagnosing corrupted stacks
  • Next by thread: Re: Diagnosing corrupted stacks
  • Index(es):
    • Date
    • Thread