]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 385386 - Assertion failed "szB >= CACHE_ENTRY_SIZE" on m_debuginfo/image.c:517.
authorJulian Seward <jseward@acm.org>
Wed, 22 Jan 2020 09:32:31 +0000 (10:32 +0100)
committerJulian Seward <jseward@acm.org>
Wed, 22 Jan 2020 09:32:31 +0000 (10:32 +0100)
Patch from Reimar Doeffinger (kde@reimardoeffinger.de).

coregrind/m_debuginfo/image.c

index c08b97839621fbbb0e5b8a1f4e4c3fbaef753afc..acb09523b634c46744f444177b1af8288e6b5bd4 100644 (file)
@@ -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) {