Segmentation fault when free

Giorgos Keramidas keramida at ceid.upatras.gr
Mon Sep 22 03:37:12 UTC 2008


On Mon, 22 Sep 2008 02:31:57 +0100, RW <fbsd06 at mlists.homeunix.com> wrote:
>Nash Nipples <trashy_bumper at 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 :)



More information about the freebsd-questions mailing list