• 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: Increasing your app's stack size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Increasing your app's stack size


  • Subject: Re: Increasing your app's stack size
  • From: Jim Ingham <email@hidden>
  • Date: Wed, 19 Sep 2007 15:13:35 -0700

MarkW is right. The exception code for an EXC_BAD_ACCESS is the address you were trying to access. So here you're dying because you tried to access 0x0 which is in the "guard region" that's set to be unreadable & unwritable specifically to catch null pointer accesses...

Usually if it's a stack overflow, you will get an EXC_BAD_ACCESS but the address will be much higher - something with non-zero in the eighth hex place.

You probably are accessing a NULL pointer.

Try rerunning the program and then look at the disassembly around where you crash. The crashing address will most likely come from accessing an address stored in some register. So, for instance on x86 in Jack's example, the crashing instruction is:

0x00001fb4 <something+10>:	mov    êx,(%esp)

Here the code is trying to write something to an address stored in the stack pointer - %esp is the stack pointer. So you can tell that it's the stack pointer that's gone bad. But if the faulting instruction is one of the eax, ebx registers, then most likely that's some pointer value that is invalid.

Jim


On Sep 19, 2007, at 2:27 PM, Mark Wagner wrote:

On 9/19/07, Mark Thomas <email@hidden> wrote:
Hi Mike,
I completely agree with your statement how-ever in this case I cannot do
much about this, as most of the stack is OS Frameworks, not my code :-(.


But looking at this technote it should possible ? - but at the minute this
is a hunch, it there a way to tell from a crash log it's this issue.


Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread:  0

Thread 0 Crashed:
0 com.apple.CoreFoundation 0x93235834 CFURLCopyAbsoluteURL + 80
..
...
175 com.bt.220v 0x00007cb0 start + 56

I'm not an expert at reading crash logs, but that looks like something's dereferencing a null pointer to me.

--
Mark
_______________________________________________
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

_______________________________________________ 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: 
 >Re: Increasing your app's stack size (From: "Michael Crawford" <email@hidden>)
 >Re: Increasing your app's stack size (From: Mark Thomas <email@hidden>)
 >Re: Increasing your app's stack size (From: "Mark Wagner" <email@hidden>)

  • Prev by Date: Re: Increasing your app's stack size
  • Next by Date: Guard Malloc crashes...
  • Previous by thread: Re: Increasing your app's stack size
  • Next by thread: Re: Increasing your app's stack size
  • Index(es):
    • Date
    • Thread