Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Sep 2016 21:06:25 -0700
From:      "K. Macy" <kmacy@freebsd.org>
To:        Pedro Giffuni <pfg@freebsd.org>
Cc:        Cedric Blancher <cedric.blancher@gmail.com>,  FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Is replacing alloca(3) where possible a good thing to do?
Message-ID:  <CAHM0Q_ONRM3_SzJaSE%2BPNBAfJOxGY1ms=mOzsuTjR0RcnmP6-g@mail.gmail.com>
In-Reply-To: <5cb743dd-60fd-8018-eaf7-fe10b8db211c@FreeBSD.org>
References:  <d192dbeb-5647-e552-9db1-b478aa7ac057@FreeBSD.org> <CALXu0UcbMtevEx8DP-557MQHVDsJuyBHz9FOWE8OV3UXErPOYA@mail.gmail.com> <90f37d14-a187-06b2-6187-7a9c1890a73f@FreeBSD.org> <CALXu0UdbDdpu3LZp3_VtwEkgmbj28hOQ5EET%2Bmwj-ZNSSS3GzQ@mail.gmail.com> <5cb743dd-60fd-8018-eaf7-fe10b8db211c@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 14, 2016 at 12:44 PM, Pedro Giffuni <pfg@freebsd.org> wrote:
> Hello;
>
>
> On 14/09/2016 14:14, Cedric Blancher wrote:
>>
>> dtrace can do VLA
>>
>> Are there other arguments?
>
>
> It was a while ago and I don't remember other than the fact that alloca()
> exists on all platforms and just works fine so why bother.

What problem are we trying to solve? Is there any indication in
practice of stack overruns or are we talking about fixing something
that isn't broken?

-M


>
> This was only a discussion in the context of printf(1) and as I wrote we
> parted different ways there. If there are other notable cases then please
> upstream those changes first.
>
> Pedro.
>
>> Ced
>>
>> On 14 September 2016 at 21:11, Pedro Giffuni <pfg@freebsd.org> wrote:
>>>
>>>
>>> On 14/09/2016 13:54, Cedric Blancher wrote:
>>>>
>>>> Who was the "principal Illumos developer"? I remember some heated
>>>> discussions, mostly rooted in 'we stick with ANSI C' and because the
>>>> CTF/dwarf tools in Illumos were unable to handle VLA and no one was
>>>> interested in fixing the BUGS in their toolchain, so the cheapest
>>>> solution was done: VLA was declared persona non grata. Saves company
>>>> money.
>>>
>>>
>>> Yes, the non-accessibility of VLAs for Dtrace was the main argument. This
>>> was a private conversation with Garrett D'Amore who did some nice
>>> enhancements to our printf(1).
>>>
>>>> Typical Sun policy which was one of the reasons which sealed the
>>>> downfall of Sun Microsystems.
>>>>
>>>> But this is NO ARGUMENT for FreeBSD...
>>>
>>>
>>> Our printf(1) implementation has all their enhancements but uses a VLA
>>> instead of alloca.
>>>
>>> This said, whatever illumos wants to keep in their code is relevant as we
>>> want to make it easy to merge ZFS and Dtrace changes back and forth.
>>>
>>> Pedro.
>>
>>
>>
>
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHM0Q_ONRM3_SzJaSE%2BPNBAfJOxGY1ms=mOzsuTjR0RcnmP6-g>