calling map() from CLI crashes the kresd
Following command in kresd CLI crashes the daemon:
[system] interactive mode
> map()
Backtrace:
Thread 1 (Thread 0x7ffff7f3e9c0 (LWP 7330)):
#0 strlen () at ../sysdeps/x86_64/strlen.S:106
#1 0x000055555555dfc8 in l_map (L=0x40000378) at daemon/engine.c:381
#2 0x00007ffff67ddca6 in lj_BC_FUNCC () from /lib64/libluajit-5.1.so.2
#3 0x00007ffff68235b0 in lua_pcall (L=<optimized out>, nargs=<optimized out>, nresults=<optimized out>, errfunc=<optimized out>) at lj_api.c:1052
#4 0x000055555555efd1 in engine_pcall (L=0x40000378, argc=2) at daemon/engine.c:644
#5 0x000055555555f049 in engine_cmd (L=0x40000378, str=0x55555579e0f0 "map()", raw=false) at daemon/engine.c:659
#6 0x00005555555699ac in tty_read (stream=0x7fffffffd760, nread=6, buf=0x7fffffffa3a0) at daemon/main.c:97
#7 0x00007ffff729d31d in uv.read () from /lib64/libuv.so.1
#8 0x00007ffff729dc1c in uv.stream_io () from /lib64/libuv.so.1
#9 0x00007ffff72a2938 in uv.io_poll () from /lib64/libuv.so.1
#10 0x00007ffff72942d4 in uv_run () from /lib64/libuv.so.1
#11 0x000055555556a5d7 in run_worker (loop=0x7ffff74ad220, engine=0x7fffffffda20, ipc_set=0x7fffffffdc20, leader=true, control_fd=-1) at daemon/main.c:367
#12 0x000055555556ba39 in main (argc=1, argv=0x7fffffffdfe8) at daemon/main.c:692
This happens on current master 5c77bcfb, i.e. is not caused by libedit support.