Re: [PATCH v2 3/5] alloca.3: clarify reasoning for no error return in BUGS

G. Branden Robinson
2025-10-29T10:30:16Z

[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]

Hi Alex,

At 2025-10-29T11:15:13+0100, Alejandro Colomar wrote:
> On Wed, Oct 29, 2025 at 03:42:00AM -0500, G. Branden Robinson wrote:
> > The sentence is confusingly cast, but the problem is not as simple
> > as you describe. It is common in English to use "neither" without
> > "not" preceding or following.
> >
> > Neither wolverines nor beavers have yet self-domesticated.
> > Neither C nor C++ are good language choices for novice programmers.
>
> C is quite simple, and as a consequence, a great choice for a novice
> programmer, IMO. :)

I should have known I couldn't slip that example past you. ;-)

> > alloca() does not query the system for available stack memory, and
> > does not fall back to using the heap if stack storage is
> > unavailable. It therefore cannot indicate an error if the
> > allocation fails. If it does, the system generates a SIGSEGV
> > signal.
>
> Is this last sentence a guarantee? Can something different ever
> occur?

I don't know the Linux kernel well enough to say. I don't know why we
still name signals after hardware traps on the PDP-11 and VAX. Well, I
do, but I'm not happy about it. It's yet another case of claiming
portability wins by rearchitecting the world to look like old hardware.

https://queue.acm.org/detail.cfm?id=3212479

> Here's somethingvery similar, with s/does/fails/ in the last sentence.

Yes, that's an improvement on my suggested wording. It keeps "does"
from working as a "pro-verb" (cf. "pronoun"); the reader does not have
to scan backward in the sentence to find out what action is referred to.

Regards,
Branden