• 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: pointer address changes for no reason
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pointer address changes for no reason


  • Subject: Re: pointer address changes for no reason
  • From: "Ewan Delanoy" <email@hidden>
  • Date: Sat, 7 Apr 2007 12:57:00 +0200 (CEST)
  • Importance: Normal

>
>> What I don't understand here  is why the
>> pointer address
>>  changed ?
>
> I've seen this happen before on Intel Macs when a buffer overrun
> occurred elsewhere. Try running your app in Guard Malloc and see if
> it crashes while running your code.
>
> Nick Zitzmann

 I also tested the app with MallocDebug (trying both the options in the
Preferences :
with or without "Clear malloc'd memory when freed"), but it does not
provide more
information than running the app unbder gdb. The main stumbling block remains
the same : a pointer becomes changed against my will and without
me knowing it, and all the debugging tools start noticing something only
far too late, when my code calls the pointer that has become invalid.
I have no way to know when and how the pointer's address was changed. Ideally
I would like to use a "global" watchpoint on my numPagesField IBoutlet,
but such
a tool does not exist ...

                                                                               Ewan



 Output when running the app with MallocDebug :

A panel appears, saying "Target application crashed
/Users/ewan/Documents/Computing/Aaron/Brouilhedou/Schreiben/build/Debug/Schreiben.app/Contents/MacOS/Schreiben
accessed memory at 0x00000015 illegally."


  Output when running the app with gdb :

Program received signal:  "SIGBUS".
libMallocDebug[Schreiben-299]: Target application (pid 299) attempted to
access memory at 0x00000015 with insufficient permissions.
libMallocDebug[Schreiben-299]: MallocDebug can't do anything about this,
so the app's just going to have to be terminated.
libMallocDebug[Schreiben-299]:
*************************************************
libMallocDebug[Schreiben-299]: THIS IS A BUG IN THE PROGRAM BEING RUN
UNDER MALLOC DEBUG,
libMallocDebug[Schreiben-299]: NOT A BUG IN MALLOC DEBUG!
libMallocDebug[Schreiben-299]:
*************************************************



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: pointer address changes for no reason
      • From: Scott Ribe <email@hidden>
References: 
 >pointer address changes for no reason (From: "Ewan Delanoy" <email@hidden>)
 >Re: pointer address changes for no reason (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: taking over othre application names in the menu bar
  • Next by Date: App crashes in 10.4.9
  • Previous by thread: Re: pointer address changes for no reason
  • Next by thread: Re: pointer address changes for no reason
  • Index(es):
    • Date
    • Thread