Discussion:
[9fans] acme Edit bug
(too old to reply)
andrey mirtchovski
2012-10-02 22:45:00 UTC
Permalink
Edit (or something in its chain) appears to be broken on buffer
boundary in p9p and in plan9. To test:

$ perl -e '{print "A"x1023;}' > t.txt # for plan9 acme replace 1023 with 8191
$ echo [any multibyte utf rune, for example Щ] >> t.txt
$ acme t.txt
[ in acme, middle-swipe "Edit , |cat" without the quotes ]

this happens with any binary on the other side of the pipe (originally
discovered with gofmt). it happens on multiples of that size too,
1024, 2048, etc for p9p. it does not occur if just the pipe is used,
only when going through Edit.
Rob Pike
2012-10-02 23:52:44 UTC
Permalink
That sounds like a bug I fixed in plan9port acme a couple of years
ago, but it's nice to see it's still broken.

I'll dig in.

-rob
erik quanstrom
2012-10-03 01:45:47 UTC
Permalink
Post by andrey mirtchovski
Edit (or something in its chain) appears to be broken on buffer
$ perl -e '{print "A"x1023;}' > t.txt # for plan9 acme replace 1023 with 8191
$ echo [any multibyte utf rune, for example Щ] >> t.txt
or with ubiquitous tools and codepoints

awk 'BEGIN{for(i = 0; i < 8191; i++) printf "a"; print "☺"}' > m

- erik
andrey mirtchovski
2012-10-03 02:31:06 UTC
Permalink
Post by erik quanstrom
or with ubiquitous tools and codepoints
don't deny me the opportunity to use the only thing I remember from perl :p
erik quanstrom
2012-10-07 12:08:38 UTC
Permalink
Post by andrey mirtchovski
Edit (or something in its chain) appears to be broken on buffer
$ perl -e '{print "A"x1023;}' > t.txt # for plan9 acme replace 1023 with 8191
$ echo [any multibyte utf rune, for example Щ] >> t.txt
$ acme t.txt
[ in acme, middle-swipe "Edit , |cat" without the quotes ]
this happens with any binary on the other side of the pipe (originally
discovered with gofmt). it happens on multiples of that size too,
1024, 2048, etc for p9p. it does not occur if just the pipe is used,
only when going through Edit.
in case you don't read the p9p list, there's a pach for this. the p9p
patch was applied; the plan 9 one has not yet been applied.

plan9 /n/sources/patch/acme-xfid
p9p https://bitbucket.org/rsc/plan9port/changeset/27213bfba2ec/

- erik

Continue reading on narkive:
Loading...