[BUG] sandbox_defconfig u-boot -T crashes

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Sep 20 18:01:00 CEST 2023


Hello Simon,

I have built sandbox_defconfig using origin/master
(b9b83a86f0e8 ("Merge branch 'master' of
https://source.denx.de/u-boot/custodians/u-boot-sh"))
on Ubuntu 23.10.

Running ./u-boot -T leads to a crash:

#9  0x00007ffff7a28189 in __libc_start_main_impl (main=0x555555591540
<main>, argc=2, argv=0x7fffffffd918, init=<optimized out>,
fini=<optimized out>, rtld_fini=<optimized out>,
     stack_end=0x7fffffffd908) at ../csu/libc-start.c:360
360     in ../csu/libc-start.c
(gdb)
#8  0x00007ffff7a280d0 in __libc_start_call_main
(main=main at entry=0x555555591540 <main>, argc=argc at entry=2,
argv=argv at entry=0x7fffffffd918)
     at ../sysdeps/nptl/libc_start_call_main.h:58
58      ../sysdeps/nptl/libc_start_call_main.h: No such file or directory.
(gdb)
#7  0x0000555555591e19 in sandbox_main (argc=2, argv=0x7fffffffd918) at
arch/sandbox/cpu/start.c:557
557             board_init_r(gd->new_gd, 0);
(gdb)
#6  board_init_r (new_gd=<optimized out>, dest_addr=dest_addr at entry=0)
at common/board_r.c:818
818             if (initcall_run_list(init_sequence_r))
(gdb)
#5  0x00005555555d961e in initcall_run_list
(init_sequence=0x5555558e1860 <init_sequence_r>) at include/initcall.h:46
46                      ret = (*init_fnc_ptr)();
(gdb)
#4  0x00005555555e695d in stdio_add_devices () at common/stdio.c:332
332                     for (ret =
uclass_first_device_check(UCLASS_KEYBOARD, &dev);
(gdb)
#3  0x00005555555f9e4f in uclass_first_device_check (devp=<optimized
out>, id=UCLASS_KEYBOARD) at drivers/core/uclass.c:644
644             return device_probe(*devp);
(gdb)
#2  0x00005555555f7235 in device_probe (dev=0x1ac9c800) at
drivers/core/device.c:583

583                     ret = drv->probe(dev);
(gdb)
#1  0x000055555560ae09 in input_stdio_register (dev=0x1aead870) at
drivers/input/input.c:674
674             if (!error && strcmp(env_get("stdin"), dev->name) == 0) {
(gdb)
#0  strcmp (cs=0x1 <error: Cannot access memory at address 0x1>,
ct=0x1aead879 "ros-ec-keyb", ct at entry=0x1aead878 "cros-ec-keyb") at
lib/string.c:217
217                     ret = a - b;


env_get("stdin") returns NULL here and should not be used without checking.

Best regards

Heinrich


More information about the U-Boot mailing list