==32533== Memcheck, a memory error detector ==32533== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==32533== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==32533== Command: ./blascrash ==32533== ==32533== Invalid read of size 8 ==32533== at 0x51AE07A: dgetf2_k (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x51AB839: dgetrf_single (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x4E88E57: dgetrf_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x400940: invert_general_matrix (in /home/allin/stats/work/dph/blascrash) ==32533== by 0x400B3D: main (in /home/allin/stats/work/dph/blascrash) ==32533== Address 0x703f780 is 0 bytes after a block of size 800 alloc'd ==32533== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==32533== by 0x400ACF: main (in /home/allin/stats/work/dph/blascrash) ==32533== ==32533== Invalid write of size 8 ==32533== at 0x51AE084: dgetf2_k (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x51AB839: dgetrf_single (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x4E88E57: dgetrf_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x400940: invert_general_matrix (in /home/allin/stats/work/dph/blascrash) ==32533== by 0x400B3D: main (in /home/allin/stats/work/dph/blascrash) ==32533== Address 0x703f780 is 0 bytes after a block of size 800 alloc'd ==32533== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==32533== by 0x400ACF: main (in /home/allin/stats/work/dph/blascrash) ==32533== ==32533== Invalid read of size 16 ==32533== at 0x50BCD55: dswap_k (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x4E83E11: dswap_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x5373C56: dgetri_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x400A43: invert_general_matrix (in /home/allin/stats/work/dph/blascrash) ==32533== by 0x400B3D: main (in /home/allin/stats/work/dph/blascrash) ==32533== Address 0x703f780 is 0 bytes after a block of size 800 alloc'd ==32533== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==32533== by 0x400ACF: main (in /home/allin/stats/work/dph/blascrash) ==32533== ==32533== Invalid write of size 8 ==32533== at 0x50BCD5A: dswap_k (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x4E83E11: dswap_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x5373C56: dgetri_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x400A43: invert_general_matrix (in /home/allin/stats/work/dph/blascrash) ==32533== by 0x400B3D: main (in /home/allin/stats/work/dph/blascrash) ==32533== Address 0x703f780 is 0 bytes after a block of size 800 alloc'd ==32533== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==32533== by 0x400ACF: main (in /home/allin/stats/work/dph/blascrash) ==32533== ==32533== Invalid read of size 16 ==32533== at 0x50BCD67: dswap_k (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x4E83E11: dswap_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x5373C56: dgetri_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x400A43: invert_general_matrix (in /home/allin/stats/work/dph/blascrash) ==32533== by 0x400B3D: main (in /home/allin/stats/work/dph/blascrash) ==32533== Address 0x703f790 is 16 bytes after a block of size 800 alloc'd ==32533== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==32533== by 0x400ACF: main (in /home/allin/stats/work/dph/blascrash) ==32533== ==32533== Invalid write of size 8 ==32533== at 0x50BCD6C: dswap_k (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x4E83E11: dswap_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x5373C56: dgetri_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x400A43: invert_general_matrix (in /home/allin/stats/work/dph/blascrash) ==32533== by 0x400B3D: main (in /home/allin/stats/work/dph/blascrash) ==32533== Address 0x703f790 is 16 bytes after a block of size 800 alloc'd ==32533== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==32533== by 0x400ACF: main (in /home/allin/stats/work/dph/blascrash) ==32533== valgrind: m_mallocfree.c:303 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed. valgrind: Heap block lo/hi size mismatch: lo = 864, hi = 18444492273895866368. This is probably caused by your program erroneously writing past the end of a heap block and corrupting heap metadata. If you fix any invalid writes reported by Memcheck, this assertion failure will probably go away. Please try that before reporting this as a bug. host stacktrace: ==32533== at 0x38083FA8: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==32533== by 0x380840C4: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==32533== by 0x38084251: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==32533== by 0x38091AFC: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==32533== by 0x3807D663: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==32533== by 0x3807BEF3: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==32533== by 0x380800CA: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==32533== by 0x3807B48A: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==32533== by 0x802CB5C10: ??? sched status: running_tid=1 Thread 1: status = VgTs_Runnable (lwpid 32533) ==32533== at 0x50BCD79: dswap_k (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x4E83E11: dswap_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x5373C56: dgetri_ (in /opt/openblas/lib/libopenblas_sandybridgep-r0.2.16dev.so) ==32533== by 0x400A43: invert_general_matrix (in /home/allin/stats/work/dph/blascrash) ==32533== by 0x400B3D: main (in /home/allin/stats/work/dph/blascrash) Note: see also the FAQ in the source distribution. It contains workarounds to several common problems. In particular, if Valgrind aborted or crashed after identifying problems in your program, there's a good chance that fixing those problems will prevent Valgrind aborting or crashing, especially if it happened in m_mallocfree.c. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what OS and version you are using. Thanks.