Date: Mon, 22 Sep 2008 06:36:58 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: RW <fbsd06@mlists.homeunix.com> Cc: freebsd-questions@freebsd.org Subject: Re: Segmentation fault when free Message-ID: <87vdwoam1x.fsf@kobe.laptop> In-Reply-To: <20080922023157.6668b46f@gumby.homeunix.com.> (RW's message of "Mon, 22 Sep 2008 02:31:57 %2B0100") References: <200809210206.52409.fbsd.questions@rachie.is-a-geek.net> <266527.92897.qm@web110502.mail.gq1.yahoo.com> <20080922023157.6668b46f@gumby.homeunix.com.>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 22 Sep 2008 02:31:57 +0100, RW <fbsd06@mlists.homeunix.com> wrote: >Nash Nipples <trashy_bumper@yahoo.com> wrote: >>Giorgos Keramidas wrote: >>> char * >>> function(void) >>> { >>> char buffer[100]; >>> >>> return buffer; >>> } >> >> that is an easier approach because you get warned on passing an >> address to a local variable > > This was an example of how to generate a failure, it's not an > approach. Yes. It was *only* written to illustrate how a particular failure could happen. I wouldn't recommend this to anyone as a programming approach :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87vdwoam1x.fsf>