LINE_MAX

Alejandro Colomar alx@kernel.org
Tue May 21 10:14:02 GMT 2024


Hi Lennart,

On Mon, May 20, 2024 at 10:35:14PM GMT, Lennart Jablonka wrote:
> Quoth Alejandro Colomar:
> > I think I found a bug in POSIX.1-2017 (and probably, previous ones too,
> > but didn't check).

[...]

> > This example seems to contradict my understanding of what limits.h says.
> > 
> > So, either limits.h should be explicit that the trailing null byte is
> > also included in LINE_MAX, or the example is bogus and should be fixed.
> > I guess it's the latter, although I wish it was the former, so we can
> > avoid a +1 in the code.
> > 
> > In any case, could you please forward this to the Austin group?
> 
> Good find.  You aren’t the first one to find it:

:-)

> https://austingroupbugs.net/view.php?id=182 discusses that example a little.
> The desired action written there appears verbatim (bar formatting) in the
> 4.1 draft of POSIX.1-202x.

Could you please paste that part of the draft?  It's quite inaccessible
to me.  And since the info is already public in the ticket, I guess it's
not a violation of anything.

Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20240521/f29d36f0/attachment-0001.sig>


More information about the Libc-alpha mailing list