• 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: gmalloc prevents a "Bus error"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gmalloc prevents a "Bus error"


  • Subject: Re: gmalloc prevents a "Bus error"
  • From: "Justin C. Walker" <email@hidden>
  • Date: Mon, 3 Oct 2005 15:29:11 -0700


On Oct 3, 2005, at 15:16 , Craig Maloney wrote:

I have a situation where running code from the command line give "Bus error" (I'm probably going out-of-bounds on an array), running in gdb (from xcode or manually from a shell) gets a "EXC_BAD_ACCESS" signal. But then if I want to turn on aggressive debugging and select the "Enable Guard Malloc" option from the debug menu, the error completely goes away and the program terminates normally.

Could someone explain to me in simple terms how turning on the most aggressive memory checking could make the error disappear altogether? Sorry if this is a bit elementary.

The simplest explanation, in the absence of real data, is the classic "good garbage vs. bad garbage" scenario: presumably, you have something like an uninitialized pointer, or (as you say) aggressive use of indexing for array access :-}; when you change the address space, which I believe you do when enabling the guard malloc stuff, you just might get lucky in that what used to be "thin air" is now valid real estate. Thus, what used to be a "bad access" is now just access to junk.


Others may have more pertinent explanations, of course.

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Some people have a mental horizon of radius zero, and
call it their point of view.
  -- David Hilbert
--------


_______________________________________________ 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: gmalloc prevents a "Bus error"
      • From: "Corey O'Connor" <email@hidden>
References: 
 >gmalloc prevents a "Bus error" (From: Craig Maloney <email@hidden>)

  • Prev by Date: XCode, CVS and nib files
  • Next by Date: Re: XCode, CVS and nib files
  • Previous by thread: gmalloc prevents a "Bus error"
  • Next by thread: Re: gmalloc prevents a "Bus error"
  • Index(es):
    • Date
    • Thread