Hi Branden,

On 8/17/22 13:24, Alejandro Colomar wrote:
Reproduced:

  1986  <$(man -w membarrier) groff -Tutf8 -man > grotty.out
  1987  less grotty.out
  1988  less -R grotty.out
  1989  batcat grotty.out


The page I used is not compressed, since it's installed from source. zcatting Debian's page should produce the same.

Both less and batcat reproduce the bug.  I attached the page so that you can inspect it (it would be interesting to know if your less(1) with my grotty.out reproduces the bug).  I;ll also show inline here the relevant part of the file:

$ grep SYS_membarrier <grotty.out | hd
00000000  20 20 20 20 20 20 20 1b  5b 31 6d 69 6e 74 20 73  | .[1mint s|
00000010  79 73 63 61 6c 6c 28 53  59 53 5f 6d 65 6d 62 61 |yscall(SYS_memba| 00000020  72 72 69 65 72 2c 20 69  6e 74 20 1b 5b 34 6d 1b  |rrier, int .[4m.| 00000030  5b 32 32 6d 63 6d 64 1b  5b 32 34 6d 1b 5b 31 6d |[22mcmd.[24m.[1m| 00000040  2c 20 75 6e 73 69 67 6e  65 64 20 69 6e 74 20 1b  |, unsigned int .| 00000050  5b 34 6d 1b 5b 32 32 6d  66 6c 61 67 73 1b 5b 32 |[4m.[22mflags.[2| 00000060  34 6d 1b 5b 31 6d 2c 20  69 6e 74 20 1b 5b 34 6d  |4m.[1m, int .[4m| 00000070  1b 5b 32 32 6d 63 70 75  5f 69 64 1b 5b 32 34 6d |.[22mcpu_id.[24m|
00000080  1b 5b 31 6d 29 3b 1b 5b  30 6d 0a                 |.[1m);.[0m.|
0000008b


I made the reproducer smaller, so that it's reasier to investigate.
I produced a one-liner file, and then script(1)ed the reproduction of the bug (I made the terminal shorter, 80x3, to get less blank lines from less(1)):

$ grep SYS_membarrier <grotty.out >offense_line.out
$ script
$ less -R offense_line.out
/cmd[ENTER]
q
$ ^D


Attached you'll find the offense line, and the typescript log.

Cheers,

Alex

--
Alejandro Colomar
<http://www.alejandro-colomar.es/>
       int syscall(SYS_membarrier, int cmd, unsigned int 
flags, int cpu_id);

Attachment: typescript
Description: Binary data

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to