bug(uniq): when using `/dev/mem` it stopped before the end of the file
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Hi, uutils mainteners
i confirmed in my side, the uu uniq truncated some reachable text, which the gnu one fully outputted
the uutils output look like that note it is truncated, because the device large
�A�
��ݨ���[�P�O�����X�3�R��Z$uðk�p�q$4�����.���@����˰��7~��@��3�
�0�@��P���� Code Ending�� � �?@@@@�?
������P�� �`����������������@��������a�fTfU����fWfVfRfQfSfPf3���f����f��f �fPf �fPf �fP���P�0
P�GP��XXXff �f��f"��f�:� ���"��E�"ع��2�0 ���"�g�k�8H�f��f��f��f��f��H���H��
�H���H�!���H�� H��H��%����
�����H��f�K@���CH��H�K4H�����ЋCf�C@�H��H��H�
��H���H+�H��) ���"����2�0�� ���"��p(f �f���f"����f��f3��f���Ѓ�
fXf"�fXf"�fXf"�fXf[fYfZf^f_������f]f\�ffffff�� G0
����
��_��_�S�� ���G����E�Y����_t.�.<5u�
�u���u����u�@�
��u���(fQS�d_����[fY��������t�t
�C변����p�r��OB��O40�0t���$��s:
�u�.��u
������@���u�@���u�@�
��u�@����ua�<r'
�u��D��u�@�;��u��2��u�)��%
�u���u����u�@�
��u�����t��uC �[������𐐐����t.�.fhfh��E�.���$PIR����N�G`x� `x��`x�ax�bx�cx��`x�ax�bx�cx��`x�ax�bx�cx�bx�cx�`x�ax��`x�ax�bx�cx��`x�ax�bx�cx�=cx�`x�ax�bx�=f�=$PCIu
�u��0��-2�������f�ˍ�$f���<u
�'�RP<u�+�s<u��h<u���]u��R< u�/�G<
u�T�<<
u�y�1<
wKP�/XsBu���<f��u���<f���f���rO<
u���<
u���<
u��� ����2�fQf���v!f��f���f���vf���tf���v����������v��fY
�t������rW��f�������&��_�����r$f��t����W��f�������f&��_���k���r#f��t����W��f�������&��_����?���rW��f�������&��_�����r$f��t����W��f�������f&��_�������r#f��t����W��f�������&��_�������PCI f�f���WfQfVf���u����Xf����f���v��2�2���t%2��;�uf
�t*fN��u�����u����sр��t��:�vĴ����ݴ�f^fY_Ë�WfQfV����������tM��2�2���;�ufQ��f���fYtf
��f�� �t(fN��u��y��u����s�����s������ݴ�f^fY_���s���␦RPR3�
�Xf��
�XZ��Ë�RP�rfQf�ϊ��fY�ȴ��X��Z
�t�ÐRP�ar␦f��t���f�ϊ���f�ȴ��X��Z
�t�ÐRP�1rf��t���f�ϊ����ȴ��X��Z
�t�Ë�RPQ�r��f�ϊ��"�Y��X��Z
�t�ÍIRPQ��r␦f��t���f��f�ϊ���Y��X��Z
�t�ÍIRPQ�rf��t�����f�ϊ����Y��X��Z
�t��`.�5b��3�f.�f&;f&�va����&�.�5b�� .�&�FG��a�R���^VÍI��w)��
w`��=�
�ua��ű<�;a��ô��Ë�2�f���v���
����<v��
�t��Q��:�Yw���ÍIRV����������IRV��������fQ��������fY�F#�
��^Z��gs�fRPf������f��$�f��
�Xf��
�fZ�
��������/r�f���s������fRf������f��$�f��
�f��
�fZÍIfQ
��ZȺ��w��sfY��fY�ÐV����������b.�^Ð���IBM COMPATIBLE 486 BIOS COPYRIGHT Phoenix Technologies, Ltd�b���Phoenix BIOS SC-T v2.1��@��3�
����PSQVWU���{rg�`�@�ۋ�ۊ&�&&�2����G(�>'����:�&�6�'�t/��2���A����9�.�3�PPPP��(.�����C���"��� ���� ]_^Y[XϹ��d���$!<!tQS�3��S
[Y������I�J�L�O�S�X�^�e������p��`0
�-\5�@����S��
�u
Y��Q���t���"�:�t�a�u��a�t����ش��2��[��?9�Uϋ�
�u
�t��&�%u�a�u��a�t����ᴀ�2�Ë�.����ty�P�a�t��a�u���
�tK��X�PQ���Y��
�tK��X�P�@�>�� � ���X��%T�q3�8(-
qPZ
uniq: read error: Permission denied
while the gnu uniq
�A�
��ݨ���[�P�O�����X�3�R��Z$uðk�p�q$4�����.���@����˰��7~��@��3�
�0�@��P���� Code Ending�� � �?@@@@�?
������P�� �`����������������@��������a�fTfU����fWfVfRfQfSfPf3���f����f��f �fPf �fPf �fP���P�0
P�GP��XXXff �f��f"��f�:� ���"��E�"ع��2�0 ���"�g�k�8H�f��f��f��f��f��H���H��
�H���H�!���H�� H��H��%����
�����H��f�K@���CH��H�K4H�����ЋCf�C@�H��H��H�
��H���H+�H��) ���"����2�0�� ���"��p(f �f���f"����f��f3��f���Ѓ�
fXf"�fXf"�fXf"�fXf[fYfZf^f_������f]f\�ffffff�� G0
����
��_��_�S�� ���G����E�Y����_t.�.<5u�
�u���u����u�@�
��u���(fQS�d_����[fY��������t�t
�C변����p�r��OB��O40�0t���$��s:
�u�.��u
������@���u�@���u�@�
��u�@����ua�<r'
�u��D��u�@�;��u��2��u�)��%
�u���u����u�@�
��u�����t��uC �[������𐐐����t.�.fhfh��E�.���$PIR����N�G`x� `x��`x�ax�bx�cx��`x�ax�bx�cx��`x�ax�bx�cx�bx�cx�`x�ax��`x�ax�bx�cx��`x�ax�bx�cx�=cx�`x�ax�bx�=f�=$PCIu
�u��0��-2�������f�ˍ�$f���<u
�'�RP<u�+�s<u��h<u���]u��R< u�/�G<
u�T�<<
u�y�1<
wKP�/XsBu���<f��u���<f���f���rO<
u���<
u���<
u��� ����2�fQf���v!f��f���f���vf���tf���v����������v��fY
�t������rW��f�������&��_�����r$f��t����W��f�������f&��_���k���r#f��t����W��f�������&��_����?���rW��f�������&��_�����r$f��t����W��f�������f&��_�������r#f��t����W��f�������&��_�������PCI f�f���WfQfVf���u����Xf����f���v��2�2���t%2��;�uf
�t*fN��u�����u����sр��t��:�vĴ����ݴ�f^fY_Ë�WfQfV����������tM��2�2���;�ufQ��f���fYtf
��f�� �t(fN��u��y��u����s�����s������ݴ�f^fY_���s���␦RPR3�
�Xf��
�XZ��Ë�RP�rfQf�ϊ��fY�ȴ��X��Z
�t�ÐRP�ar␦f��t���f�ϊ���f�ȴ��X��Z
�t�ÐRP�1rf��t���f�ϊ����ȴ��X��Z
�t�Ë�RPQ�r��f�ϊ��"�Y��X��Z
�t�ÍIRPQ��r␦f��t���f��f�ϊ���Y��X��Z
�t�ÍIRPQ�rf��t�����f�ϊ����Y��X��Z
�t��`.�5b��3�f.�f&;f&�va����&�.�5b�� .�&�FG��a�R���^VÍI��w)��
w`��=�
�ua��ű<�;a��ô��Ë�2�f���v���
����<v��
�t��Q��:�Yw���ÍIRV����������IRV��������fQ��������fY�F#�
��^Z��gs�fRPf������f��$�f��
�Xf��
�fZ�
��������/r�f���s������fRf������f��$�f��
�f��
�fZÍIfQ
��ZȺ��w��sfY��fY�ÐV����������b.�^Ð���IBM COMPATIBLE 486 BIOS COPYRIGHT Phoenix Technologies, Ltd�b���Phoenix BIOS SC-T v2.1��@��3�
����PSQVWU���{rg�`�@�ۋ�ۊ&�&&�2����G(�>'����:�&�6�'�t/��2���A����9�.�3�PPPP��(.�����C���"��� ���� ]_^Y[XϹ��d���$!<!tQS�3��S
[Y������I�J�L�O�S�X�^�e������p��`0
�-\5�@����S��
�u
Y��Q���t���"�:�t�a�u��a�t����ش��2��[��?9�Uϋ�
�u
�t��&�%u�a�u��a�t����ᴀ�2�Ë�.����ty�P�a�t��a�u���
�tK��X�PQ���Y��
�tK��X�P�@�>�� � ���X��%T�q3�8(-
qPZ
8(-
gnuuniq: error reading '/dev/mem': Operation not permitted
look the 8(- missing on the uu output whiches fully reachable
NOTE: that was just an example, for reproduce it in your /dev/mem, compare the output of uu and gnu uniq both and see is anything missing, /dev/mem is different across machine
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing uutils uniq with GNU uniq on /dev/mem, using the reported missing 8(- bytes as the symptom. Trace how each command handles the device read and its permission error; done means uutils does not omit reachable output before reporting the read failure, with behavior verified on a reproducible test input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100