==10770== Memcheck, a memory error detector ==10770== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==10770== Using Valgrind-3.15.0.GIT and LibVEX; rerun with -h for copyright info ==10770== Command: nano ../agh_ubus.c ==10770== Parent PID: 1665 ==10770== ==10770== Syscall param ioctl(TIOCLINUX) points to uninitialised byte(s) ==10770== at 0x49EA4FD: ioctl (in /usr/lib/libc-2.28.so) ==10770== by 0x12BAD3: parse_kbinput (winio.c:596) ==10770== by 0x12CD0E: get_kbinput (winio.c:338) ==10770== by 0x11CDE6: do_input (nano.c:1670) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Address 0xbe9106c9 is on thread 1's stack ==10770== in frame #1, created by parse_kbinput (winio.c:354) ==10770== ==10770== Syscall param ioctl(TIOCLINUX) points to uninitialised byte(s) ==10770== at 0x49EA4FD: ioctl (in /usr/lib/libc-2.28.so) ==10770== by 0x12BAD3: parse_kbinput (winio.c:596) ==10770== by 0x12CD0E: get_kbinput (winio.c:338) ==10770== by 0x11D800: do_statusbar_input (prompt.c:69) ==10770== by 0x11DDF8: acquire_an_answer (prompt.c:465) ==10770== by 0x11E16D: do_prompt (prompt.c:622) ==10770== by 0x112058: do_insertfile (files.c:1114) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Address 0xbe910539 is on thread 1's stack ==10770== in frame #1, created by parse_kbinput (winio.c:354) ==10770== ==10770== Invalid read of size 4 ==10770== at 0x1194F0: has_old_position (history.c:604) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Address 0x4b7a6a0 is 0 bytes inside a block of size 16 free'd ==10770== at 0x4836448: free (vg_replace_malloc.c:540) ==10770== by 0x119320: reload_positions_if_needed (history.c:516) ==10770== by 0x119320: reload_positions_if_needed (history.c:504) ==10770== by 0x1194E8: has_old_position (history.c:602) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Block was alloc'd at ==10770== at 0x4835558: malloc (vg_replace_malloc.c:309) ==10770== by 0x127A41: nmalloc (utils.c:349) ==10770== by 0x119048: load_poshistory (history.c:433) ==10770== by 0x10B882: main (nano.c:2448) ==10770== ==10770== Invalid read of size 1 ==10770== at 0x4838A15: strcmp (vg_replace_strmem.c:849) ==10770== by 0x1194F7: has_old_position (history.c:604) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Address 0x4b7a6e0 is 0 bytes inside a block of size 50 free'd ==10770== at 0x4836448: free (vg_replace_malloc.c:540) ==10770== by 0x119317: reload_positions_if_needed (history.c:515) ==10770== by 0x119317: reload_positions_if_needed (history.c:504) ==10770== by 0x1194E8: has_old_position (history.c:602) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Block was alloc'd at ==10770== at 0x48354B4: malloc (vg_replace_malloc.c:308) ==10770== by 0x483740E: realloc (vg_replace_malloc.c:836) ==10770== by 0x127AF7: nrealloc (utils.c:361) ==10770== by 0x127BD2: mallocstrncpy (utils.c:380) ==10770== by 0x127C17: mallocstrcpy (utils.c:390) ==10770== by 0x119057: load_poshistory (history.c:434) ==10770== by 0x10B882: main (nano.c:2448) ==10770== ==10770== Invalid read of size 4 ==10770== at 0x1194FF: has_old_position (history.c:605) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Address 0x4b7a6ac is 12 bytes inside a block of size 16 free'd ==10770== at 0x4836448: free (vg_replace_malloc.c:540) ==10770== by 0x119320: reload_positions_if_needed (history.c:516) ==10770== by 0x119320: reload_positions_if_needed (history.c:504) ==10770== by 0x1194E8: has_old_position (history.c:602) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Block was alloc'd at ==10770== at 0x4835558: malloc (vg_replace_malloc.c:309) ==10770== by 0x127A41: nmalloc (utils.c:349) ==10770== by 0x119048: load_poshistory (history.c:433) ==10770== by 0x10B882: main (nano.c:2448) ==10770== ==10770== Invalid read of size 4 ==10770== at 0x119518: has_old_position (history.c:612) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Address 0x4b81ae4 is 4 bytes inside a block of size 16 free'd ==10770== at 0x4836448: free (vg_replace_malloc.c:540) ==10770== by 0x119320: reload_positions_if_needed (history.c:516) ==10770== by 0x119320: reload_positions_if_needed (history.c:504) ==10770== by 0x1194E8: has_old_position (history.c:602) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Block was alloc'd at ==10770== at 0x4835558: malloc (vg_replace_malloc.c:309) ==10770== by 0x127A41: nmalloc (utils.c:349) ==10770== by 0x119048: load_poshistory (history.c:433) ==10770== by 0x10B882: main (nano.c:2448) ==10770== ==10770== Invalid read of size 4 ==10770== at 0x119520: has_old_position (history.c:613) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Address 0x4b81ae8 is 8 bytes inside a block of size 16 free'd ==10770== at 0x4836448: free (vg_replace_malloc.c:540) ==10770== by 0x119320: reload_positions_if_needed (history.c:516) ==10770== by 0x119320: reload_positions_if_needed (history.c:504) ==10770== by 0x1194E8: has_old_position (history.c:602) ==10770== by 0x112294: do_insertfile (files.c:1229) ==10770== by 0x11D065: do_input (nano.c:1792) ==10770== by 0x10C062: main (nano.c:2709) ==10770== Block was alloc'd at ==10770== at 0x4835558: malloc (vg_replace_malloc.c:309) ==10770== by 0x127A41: nmalloc (utils.c:349) ==10770== by 0x119048: load_poshistory (history.c:433) ==10770== by 0x10B882: main (nano.c:2448) ==10770== ==10770== ==10770== HEAP SUMMARY: ==10770== in use at exit: 916,648 bytes in 5,907 blocks ==10770== total heap usage: 22,343 allocs, 16,436 frees, 2,451,857 bytes allocated ==10770== ==10770== LEAK SUMMARY: ==10770== definitely lost: 0 bytes in 0 blocks ==10770== indirectly lost: 0 bytes in 0 blocks ==10770== possibly lost: 0 bytes in 0 blocks ==10770== still reachable: 916,648 bytes in 5,907 blocks ==10770== suppressed: 0 bytes in 0 blocks ==10770== Reachable blocks (those to which a pointer was found) are not shown. ==10770== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==10770== ==10770== Use --track-origins=yes to see where uninitialised values come from ==10770== For lists of detected and suppressed errors, rerun with: -s ==10770== ERROR SUMMARY: 2501 errors from 7 contexts (suppressed: 0 from 0)