==25011== Invalid read of size 8
==25011== at 0x10A2CC: free_default_iterator_data (default_mx_iterator.c:30)
==25011== by 0x109465: main (mnist_ann.c:66)
==25011== Address 0x5f791b0 is 0 bytes after a block of size 400 alloc'd
==25011== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25011== by 0x10A0B2: read_idx3 (read_idx3.c:47)
==25011== by 0x109280: main (mnist_ann.c:35)
==25011==
==25011== Invalid read of size 8
==25011== at 0x10A2CC: free_default_iterator_data (default_mx_iterator.c:30)
==25011== by 0x10946D: main (mnist_ann.c:67)
==25011== Address 0x5b798e0 is 0 bytes after a block of size 400 alloc'd
==25011== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25011== by 0x10A483: read_idx1_build_mx (read_idx1_build_mx.c:39)
==25011== by 0x10A688: get_mnist_labels (get_mnist_labels.c:20)
==25011== by 0x109294: main (mnist_ann.c:36)
==25011==
==25011==
==25011== HEAP SUMMARY:
==25011== in use at exit: 63,522,400 bytes in 200 blocks
==25011== total heap usage: 1,442 allocs, 1,242 frees, 449,478,248 bytes allocated
==25011==
==25011== 801,200 (1,200 direct, 800,000 indirect) bytes in 50 blocks are definitely lost in loss record 2 of 4
==25011== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25011== by 0x10A712: mx_create (mx.c:18)
==25011== by 0x10A5EA: build_mnist_labels (get_mnist_labels.c:9)
==25011== by 0x10A4B8: read_idx1_build_mx (read_idx1_build_mx.c:45)
==25011== by 0x10A688: get_mnist_labels (get_mnist_labels.c:20)
==25011== by 0x109294: main (mnist_ann.c:36)
==25011==
==25011== 62,721,200 (1,200 direct, 62,720,000 indirect) bytes in 50 blocks are definitely lost in loss record 4 of 4
==25011== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25011== by 0x10A712: mx_create (mx.c:18)
==25011== by 0x10A101: read_idx3 (read_idx3.c:52)
==25011== by 0x109280: main (mnist_ann.c:35)
==25011==
==25011== LEAK SUMMARY:
==25011== definitely lost: 2,400 bytes in 100 blocks
==25011== indirectly lost: 63,520,000 bytes in 100 blocks
==25011== possibly lost: 0 bytes in 0 blocks
==25011== still reachable: 0 bytes in 0 blocks
==25011== suppressed: 0 bytes in 0 blocks
==25011==
==25011== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
==25011==
==25011== 1 errors in context 1 of 4:
==25011== Invalid read of size 8
==25011== at 0x10A2CC: free_default_iterator_data (default_mx_iterator.c:30)
==25011== by 0x10946D: main (mnist_ann.c:67)
==25011== Address 0x5b798e0 is 0 bytes after a block of size 400 alloc'd
==25011== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25011== by 0x10A483: read_idx1_build_mx (read_idx1_build_mx.c:39)
==25011== by 0x10A688: get_mnist_labels (get_mnist_labels.c:20)
==25011== by 0x109294: main (mnist_ann.c:36)
==25011==
==25011==
==25011== 1 errors in context 2 of 4:
==25011== Invalid read of size 8
==25011== at 0x10A2CC: free_default_iterator_data (default_mx_iterator.c:30)
==25011== by 0x109465: main (mnist_ann.c:66)
==25011== Address 0x5f791b0 is 0 bytes after a block of size 400 alloc'd
==25011== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25011== by 0x10A0B2: read_idx3 (read_idx3.c:47)
==25011== by 0x109280: main (mnist_ann.c:35)
==25011==