• 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: Stack overflow detection/Stack use over time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stack overflow detection/Stack use over time


  • Subject: Re: Stack overflow detection/Stack use over time
  • From: Guillaume Billard <email@hidden>
  • Date: Thu, 1 Apr 2010 17:30:40 +0200

Le 1 avr. 2010 à 16:00, Fritz Anderson a écrit :

Try stack canaries.

<http://lists.apple.com/archives/xcode-users/2007/Dec/msg00055.html>

I tried with -fstack-protector-all, but I can't see any improvement. I get the same behavior and the same messages, and the callstacks shown by GDB sometimes are empty or incomplete.
I assumed the callstacks would be from the thread whose stack is too small but it's not always the case.


Le 1 avr. 2010 à 16:09, Paul Sanders a écrit :

You could also try writing something like this to see if the 
effect it creates in GDB mimics what you are seeing in your app:

void black_hole (int depth)
{
   black_hole (depth + 1);
}

I tried this with a Cocoa sample application and I get the same messages, the main difference is that the behavior is consistent with each run instead of having random crash points:
"
Running…
Program received signal:  “EXC_BAD_ACCESS”.
[Switching to process 9198]
[Switching to process 9198]
sharedlibrary apply-load-rules all
Warning: the current language does not match this frame.
warning: Unable to restore previously selected frame.
No memory available to program now: unsafe to call malloc
warning: check_safe_call: could not restore current frame

warning: Unable to restore previously selected frame.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Not safe to call dlopen at this time.)
"

Xcode also displays a message box because it takes about 30 seconds to create the "black_hole" callstack, eg: "Loading 16382 stack frames... (21%)".
Adding -fstack-protector-all to "Other C Flags" doesn't help, I still see the same behavior.

Thanks for your answers!

 _______________________________________________
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

  • Follow-Ups:
    • Re: Stack overflow detection/Stack use over time
      • From: Scott Ribe <email@hidden>
References: 
 >Stack overflow detection/Stack use over time (From: Guillaume Billard <email@hidden>)
 >Re: Stack overflow detection/Stack use over time (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Stack overflow detection/Stack use over time
  • Next by Date: Re: What downloads do I need?
  • Previous by thread: Re: Stack overflow detection/Stack use over time
  • Next by thread: Re: Stack overflow detection/Stack use over time
  • Index(es):
    • Date
    • Thread