]>
git.ipfire.org Git - thirdparty/valgrind.git/commit
Fix a bug in the debug code of find_chunk_for.
find_chunk_for has a special case for zero size block.
The special case was missing in the find_chunk_for_OLD.
So, when enabling the leak check debug, the following assert
is raised with ./vg-in-place ./memcheck/tests/leak-0
if you comment the lines (in find_chunk_for_OLD)
if (a_lo == a_hi)
a_hi++; // Special case for szB 0. See find_chunk_for.
and define VG_DEBUG_FIND_CHUNK
Memcheck: mc_leakcheck.c:327 (find_chunk_for): Assertion 'retVal == find_chunk_for_OLD ( ptr, chunks, n_chunks )' failed.
host stacktrace:
==7868== at 0x38031535: show_sched_status_wrk (m_libcassert.c:343)
==7868== by 0x38031641: report_and_quit (m_libcassert.c:415)
==7868== by 0x38031723: vgPlain_assert_fail (m_libcassert.c:481)
==7868== by 0x38004AA6: find_chunk_for (mc_leakcheck.c:327)
==7868== by 0x38005236: lc_is_a_chunk_ptr (mc_leakcheck.c:538)
==7868== by 0x3800556D: lc_push_without_clique_if_a_chunk_ptr (mc_leakcheck.c:893)
==7868== by 0x38035234: apply_to_GPs_of_tid (m_machine.c:199)
==7868== by 0x38035234: vgPlain_apply_to_GP_regs (m_machine.c:425)
==7868== by 0x38006406: vgMemCheck_detect_memory_leaks (mc_leakcheck.c:1913)
==7868== by 0x38015872: mc_handle_client_request (mc_main.c:6628)
==7868== by 0x38047AB8: wrap_tool_handle_client_request (m_tooliface.c:280)
==7868== by 0x3807C5C4: do_client_request (scheduler.c:2101)
==7868== by 0x3807C5C4: vgPlain_scheduler (scheduler.c:1425)
==7868== by 0x38089973: thread_wrapper (syswrap-linux.c:102)
==7868== by 0x38089973: run_a_thread_NORETURN (syswrap-linux.c:155)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15731