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