# valgrind ./conftest ==21732== Memcheck, a memory error detector ==21732== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==21732== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==21732== Command: ./conftest ==21732== ==21732== Invalid write of size 4 ==21732== at 0x4C2F25F: memset (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==21732== by 0x4EF8636: clean_state_log_if_needed (regexec.c:1748) ==21732== by 0x4F00420: re_search_internal (regexec.c:2553) ==21732== by 0x4F04A11: re_search_stub (regexec.c:462) ==21732== by 0x4F052A7: re_search (regexec.c:325) ==21732== by 0x4008BF: main (in /var/tmp/portage/sys-boot/grub-2.00_p5107-r2/work/grub-2.00-pc/conftest) ==21732== Address 0x51e43e8 is 0 bytes after a block of size 104 alloc'd ==21732== at 0x4C2C94E: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==21732== by 0x4EF853C: extend_buffers (regexec.c:4125) ==21732== by 0x4EF85E3: clean_state_log_if_needed (regexec.c:1741) ==21732== by 0x4F00420: re_search_internal (regexec.c:2553) ==21732== by 0x4F04A11: re_search_stub (regexec.c:462) ==21732== by 0x4F052A7: re_search (regexec.c:325) ==21732== by 0x4008BF: main (in /var/tmp/portage/sys-boot/grub-2.00_p5107-r2/work/grub-2.00-pc/conftest) ==21732== ==21732== Invalid read of size 8 ==21732== at 0x4F00467: re_search_internal (regexec.c:2561) ==21732== by 0x4F04A11: re_search_stub (regexec.c:462) ==21732== by 0x4F052A7: re_search (regexec.c:325) ==21732== by 0x4008BF: main (in /var/tmp/portage/sys-boot/grub-2.00_p5107-r2/work/grub-2.00-pc/conftest) ==21732== Address 0x51e4440 is not stack'd, malloc'd or (recently) free'd ==21732== ==21732== Invalid read of size 4 ==21732== at 0x4EF8689: re_string_context_at (regex_internal.c:937) ==21732== by 0x4F00595: re_search_internal (regexec.c:2571) ==21732== by 0x4F04A11: re_search_stub (regexec.c:462) ==21732== by 0x4F052A7: re_search (regexec.c:325) ==21732== by 0x4008BF: main (in /var/tmp/portage/sys-boot/grub-2.00_p5107-r2/work/grub-2.00-pc/conftest) ==21732== Address 0x51e436c is 20 bytes before a block of size 104 alloc'd ==21732== at 0x4C2C94E: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==21732== by 0x4EF853C: extend_buffers (regexec.c:4125) ==21732== by 0x4EF85E3: clean_state_log_if_needed (regexec.c:1741) ==21732== by 0x4F00420: re_search_internal (regexec.c:2553) ==21732== by 0x4F04A11: re_search_stub (regexec.c:462) ==21732== by 0x4F052A7: re_search (regexec.c:325) ==21732== by 0x4008BF: main (in /var/tmp/portage/sys-boot/grub-2.00_p5107-r2/work/grub-2.00-pc/conftest) ==21732== valgrind: m_mallocfree.c:268 (mk_plain_bszB): Assertion 'bszB != 0' failed. valgrind: 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. ==21732== at 0x38055DAF: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==21732== by 0x38055EFA: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==21732== by 0x380009EC: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==21732== by 0x38061EC7: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==21732== by 0x38028254: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==21732== by 0x3802859F: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==21732== by 0x3809BA7B: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) ==21732== by 0x380AB169: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux) sched status: running_tid=1 Thread 1: status = VgTs_Runnable ==21732== at 0x4C2A574: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==21732== by 0x4EFAAAA: re_acquire_state_context (regex_internal.c:1670) ==21732== by 0x4F005AC: re_search_internal (regexec.c:2574) ==21732== by 0x4F04A11: re_search_stub (regexec.c:462) ==21732== by 0x4F052A7: re_search (regexec.c:325) ==21732== by 0x4008BF: main (in /var/tmp/portage/sys-boot/grub-2.00_p5107-r2/work/grub-2.00-pc/conftest) 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.