uutils / uutils/coreutils

bug(fmt): when using `/dev/mem` it stopped before the end of the file

Open
#13,090 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - fmt
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

Hi, uutils mainteners

we confirmed when the filename is /dev/mem

the uu fmt

stops at

qPZ 8(-

while the gnu fmt stops at

qPZ 8(- dpaPR


@@((PP((PP,(-)*.)�@�ء����
��@��f3���~������~~������~l���|88|�|88|8���|8|�|8|<<��������<fBBf<������}���x<fff<~?3?00p��cccg���Z<��<Z��������>�><~~<ffffff��{c8ll8��~~~<~~<�<~~<

�

0`�`0����$f�f$<~����~<<<lllll�l�ll~�|���0f�8l8v��v00`0```0`00`f<�<f~0~

0`��|�����|0p0000�x�
                    8`��x�
                          8
                           �x<l��
                                 ���

                                    �x8`����x��

000x��x��xx��|
              p00`�`0~~`0
                         0`<f

|�����|0x������ff|ff�<f���f<�lfffl��bhxhb��bhxh`�<f���f:�������x00000x




��x�flxlf��```bf���������������8l���l8�ff|``�|����|�ff|lf�|��x�|��0000x������������x0������l��l8l�����x00x�ƌ2f�x`````x�`0

xx8l��00x
         |�v�``|ff�x���x


|��vx���x8ld�``�v��|
                    ��`lvff�0p000x



��x�`flxl�p00000x����������x���x�ff|`�v��|

�vb`�|�p�0�004����v���x0����l�l8l����|

���0d�00�00�0000�v�8l����_�p���q����p�����q�����������T����������W�e�M�A��L9�Y�.�����n�S�S���������������9?PCI/ISA�[��09/06/25�
gnufmt: read error

there was a truncation in the uu one it do not completed until the end of the file, stopped early

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Rust implementation and tests for the fmt command, then reproduce the behavior with /dev/mem and compare it with GNU fmt. Trace why uu fmt stops before EOF; done means it processes the input through the end of the file without the observed premature truncation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.