• 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: C local auto-initialized?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C local auto-initialized?


  • Subject: Re: C local auto-initialized?
  • From: Scott Ribe <email@hidden>
  • Date: Thu, 20 Sep 2007 15:36:24 -0600
  • Thread-topic: C local auto-initialized?

Remember that when blocks are first allocated into your address space by the
VM system, they are zero'd as a security measure to prevent data from
leaking across process boundaries. This is not an uncommon scenario: a
variable that ought to be initialized to 0 isn't, and in light testing it's
always 0, but in use where the application is run for a long time it
eventually starts to get non-zero values. Not so much values on the stack
because the stack occupies memory that tends to get overwritten often, but
I've seen this in member variables. Like, uh, a couple of weeks ago ;-)


--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


 _______________________________________________
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: C local auto-initialized? (persists)
      • From: Fritz Anderson <email@hidden>
References: 
 >C local auto-initialized? (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: C local auto-initialized?
  • Next by Date: Re: C local auto-initialized?
  • Previous by thread: Re: C local auto-initialized?
  • Next by thread: Re: C local auto-initialized? (persists)
  • Index(es):
    • Date
    • Thread