9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Jacob Moody <moody@posixcafe.org>
To: 9front@9front.org
Subject: Re: [9front] [PATCH] awk: don't write an extra NUL past the end of a block
Date: Tue, 23 Jan 2024 11:50:59 -0600	[thread overview]
Message-ID: <b6b8797a-c1d0-427a-8fd2-b349f5e995e3@posixcafe.org> (raw)
In-Reply-To: <F056E68DACC66F58F358BC3E2E6D2983@wopr.sciops.net>

On my linux machine:
# nawk is onetrueawk
; dd </dev/zero bs=4 count=8k | tr '\0' A | nawk '{a=$1}'
8192+0 records in
8192+0 records out
32768 bytes (33 kB, 32 KiB) copied, 0.00933006 s, 3.5 MB/s

This works fine. No crash. I am not doubting this needs fixed,
I am doubtful of fixing it in this way being correct. It is still
not clear to me if there is some other input that is relying on
that extra line to be there. But it is clear that onetrueawk fixed
this using some other fix.

We should figure out how they solved it and/or prove that the cases
in which those loops never run are impossible to hit.


  reply	other threads:[~2024-01-23 17:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23  7:44 Kristo
2024-01-23 16:53 ` Jacob Moody
2024-01-23 17:40   ` qwx
2024-01-23 17:45     ` qwx
2024-01-23 17:50       ` Jacob Moody [this message]
2024-01-23 18:47         ` Aw: " Alexander Shendi
2024-01-23 18:32   ` Kristo
2024-01-23 21:27     ` Jacob Moody

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6b8797a-c1d0-427a-8fd2-b349f5e995e3@posixcafe.org \
    --to=moody@posixcafe.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).