From: Julian Seward Date: Wed, 22 Jan 2020 09:32:31 +0000 (+0100) Subject: Bug 385386 - Assertion failed "szB >= CACHE_ENTRY_SIZE" on m_debuginfo/image.c:517. X-Git-Tag: VALGRIND_3_16_0~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3542be5bdc706b1a7d5d080ea01e81d4791e20b4;p=thirdparty%2Fvalgrind.git Bug 385386 - Assertion failed "szB >= CACHE_ENTRY_SIZE" on m_debuginfo/image.c:517. Patch from Reimar Doeffinger (kde@reimardoeffinger.de). --- diff --git a/coregrind/m_debuginfo/image.c b/coregrind/m_debuginfo/image.c index c08b978396..acb09523b6 100644 --- a/coregrind/m_debuginfo/image.c +++ b/coregrind/m_debuginfo/image.c @@ -509,10 +509,10 @@ static UInt alloc_CEnt ( DiImage* img, SizeT szB, Bool fromC ) return entNo; } -static void realloc_CEnt ( DiImage* img, UInt entNo, SizeT szB ) +static void realloc_CEnt ( DiImage* img, UInt entNo, SizeT szB, Bool fromC ) { vg_assert(img != NULL); - vg_assert(szB >= CACHE_ENTRY_SIZE); + vg_assert(fromC || szB >= CACHE_ENTRY_SIZE); vg_assert(is_sane_CEnt("realloc_CEnt-pre", img, entNo)); img->ces[entNo] = ML_(dinfo_realloc)("di.realloc_CEnt.1", img->ces[entNo], @@ -768,7 +768,7 @@ static UChar get_slowcase ( DiImage* img, DiOffT off ) } vg_assert(i >= 0 && i < CACHE_N_ENTRIES); - realloc_CEnt(img, i, size); + realloc_CEnt(img, i, size, /*fromC?*/cslc != NULL); img->ces[i]->size = size; img->ces[i]->used = 0; if (cslc == NULL) {