Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: tlug: gcc question
- To: tlug@example.com
- Subject: Re: tlug: gcc question
- From: Selva Nair <selva@example.com>
- Date: Fri, 14 Jan 2000 00:50:36 +0900 (JST)
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- In-Reply-To: <387DB3D3.15948545@example.com>
- Reply-To: tlug@example.com
- Sender: owner-tlug@example.com
On Thu, 13 Jan 2000, Fredric Fredricson wrote: > You are right that gcc/egcs, or any c compiler for that matter, does not > initialize the pointers but Linux will clear all new pages so in this > particular case both pointers will be "initialized" to 0. > It is of course a bug to rely on this but I have seem dozens of > programs that does (probably/hopefully unintentional). > > From a developers point of view it is a good thing that Linux > does not allow access to memory address 0. This way uninitialized Really? I have never seen that happening though. In my experience, uninitialized pointers on egcs/Linux do point to arbitrary locations.. Try this: int main() { char *c1, *c2, *c3; printf("%d %d %d\n", c1, c2, c3); return 0; } Selva ------------------------------------------------------------------- Next Technical Meeting: January 14 (Fri) 19:00 * Topic: "glibc - current status and future developments" * Guest Speaker: Ulrich Drepper (Cygnus Solutions) * Place: Oracle Japan HQ 12F Seminar Room (New Otani Garden Court) ------------------------------------------------------------------- more info: http://www.tlug.gr.jp Sponsor: Global Online Japan
- Follow-Ups:
- Re: tlug: gcc question
- From: Fredric Fredricson <fredric.fredriksson@example.com>
- References:
- Re: tlug: gcc question
- From: Fredric Fredricson <Fredric.Fredriksson@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: tlug: gcc question
- Next by Date: tlug: Tomorrow's Meeting
- Prev by thread: Re: tlug: gcc question
- Next by thread: Re: tlug: gcc question
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links