From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public From: The Deviant Subject: Re: C is 'better' than Ada because... Date: 1996/06/23 Message-ID: #1/1 X-Deja-AN: 161705684 references: <4q8fbo$701@red.interact.net.au> <31CC75C1.5BF2AF6A@jinx.sckans.edu> content-type: TEXT/PLAIN; charset=US-ASCII organization: The Silicon Pirates mime-version: 1.0 newsgroups: comp.lang.c,comp.lang.ada Date: 1996-06-23T00:00:00+00:00 List-Id: On 22 Jun 1996, Robert Dewar wrote: > Date: 22 Jun 1996 20:20:19 -0400 > From: Robert Dewar > Newsgroups: comp.lang.c, comp.lang.ada > Subject: Re: C is 'better' than Ada because... > > > that c code *will* have to be changed... > But I am curious why it did seg fault sooner? > (BTW, That's why I'm posting this back to comp.lang.c) > Can anyone tell me why this doesn't seg fault sooner? > OS is Linux 2.0, GNU g++" > > I have no idea why you expect a seg fault at any particular point. If > you get a seg fault at all, it is certaily *very* implementation > dependent where it will occur, since who knows how the compiler lays > out memory, for example, it may put critical data for interfacing with > the operating system right after your array so that much more interesting > things happen than a segfault, such as destruction of your system disk :-) > But, the variable was initialized as char blah[5]; which means it goes out of its bouts as soon as it tries to access blah[5], and thats when SIGSEGV, by definition, should occur. --Deviant