Summary: | Multiple realloc zero errors crash in MC_(eq_Error) | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Mark Wielaard <mark> |
Component: | memcheck | Assignee: | Mark Wielaard <mark> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | pjfloyd |
Priority: | NOR | ||
Version: | 3.21.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | memcheck: Handle Err_ReallocSizeZero in MC_(eq_Error) |
Description
Mark Wielaard
2023-06-01 14:19:21 UTC
Created attachment 159393 [details]
memcheck: Handle Err_ReallocSizeZero in MC_(eq_Error)
Proposed patch and new testcases
LGTM except that memcheck/tests/realloc_size_zero_again needs to be in .gitignore (and add this item to NEWS) (In reply to Paul Floyd from comment #2) > LGTM except that memcheck/tests/realloc_size_zero_again needs to be in > .gitignore (and add this item to NEWS) Thanks, pushed with those changes. commit 453c7111133ce9dc5dce043e03b7b58efdbf46cd Author: Mark Wielaard <mark@klomp.org> Date: Thu Jun 1 16:10:56 2023 +0200 memcheck: Handle Err_ReallocSizeZero in MC_(eq_Error) When an realloc size zero error is emitted MC_(eq_Error) is called to see if the errors can be deduplicated. This crashed since Err_ReallocSizeZero wasn't handled. Handle it like Err_Free. Also add a testcase for this case and test with both --realloc-zero-bytes-frees=yes and --realloc-zero-bytes-frees=no. Which will report a different number of errors. https://bugs.kde.org/show_bug.cgi?id=470520 |