Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#4151 assigned defect

shell command 'hexdump' broken

Reported by: Frank Kuehndel Owned by:
Priority: low Milestone: Indefinite
Component: shell Version: 6
Severity: normal Keywords: hexdump shell
Cc: Blocked By:
Blocking:

Description

SHLL [/] # hexdump -n 20 etc
%07.7qx %04qx %04qx %04qx %04qx %04qx %04qx %04qx %04qx
%07.7qx %04qx %04qx                              
%07.7qx

This output is not what I expected. I can use instead of directory 'etc' a file but that won't change the output. Not providing option '-n 20' will lead to no output:

SHLL [/] # hexdump hello.txt
SHLL [/] # 

Providing a path containing a '/' will lead to this:

SHLL [/] # hexdump -n 20 etc/group
no file (stdin no supported): Operation canceled

In addition, the option '-C' leads to a crash.

How to reproduce:

Start the shell in QEMU and then type the above example commands.

env QEMU_AUDIO_DRV="none" qemu-system-arm -net none -nographic -M realview-pbx-a9 -m 256M -kernel build/arm/realview_pbx_a9_qemu/testsuites/libtests/dl10.exe

I tested in this environment:

RTEMS_VERSION    = 6.0.0
remote origin    = git://git.rtems.org/rtems.git
commit HEAD      = df9cc1aee87da6c6ba41d52454fa5f45fba74501  (HEAD -> master, origin/master, origin/HEAD)
config.ini       =
    [arm/realview_pbx_a9_qemu]
    RTEMS_DEBUG = True
    RTEMS_NETWORKING = True
    RTEMS_POSIX_API = True
    RTEMS_SMP = True
    BUILD_TESTS = True
NEWLIB_VERSION   = 3.2.0
SOURCE_BUILDER   = Set Builder, 6 (31f936a7b74d)
GCC_VERSION      = arm-rtems6-gcc (GCC) 10.2.1 20200904 (RTEMS 6, RSB 31f936a7b74d60bda609a9960c6e1a705ba54974, Newlib a0d7982)
BINUTILS_VERSION = GNU ld (GNU Binutils) 2.35.50.20200904

Change History (1)

comment:1 Changed on 10/15/20 at 15:40:46 by Frank Kuehndel

See also #3514 "Resource Leak in hexdump-parse.c"

Note: See TracTickets for help on using tickets.