| Summary: | helgrind reports false races for printfs using mempcpy manipulating FILE* state in glibc-2.26+ | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Jesus Checa <jcheca> |
| Component: | helgrind | Assignee: | Julian Seward <jseward> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | mark |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=352130 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
valgrind run in RHEL 8.5 with glibc 2.28
Patch adding suppression + testcase |
||
|
Description
Jesus Checa
2022-02-28 11:56:52 UTC
Created attachment 147188 [details] Patch adding suppression + testcase Attaching a patch that adds the corresponding suppression and a testcase with Mark Wielaard's reproducer from bug 352130 (In reply to Jesus Checa from comment #1) > Created attachment 147188 [details] > Patch adding suppression + testcase > > Attaching a patch that adds the corresponding suppression and a testcase > with Mark Wielaard's reproducer from bug 352130 Looks correct. Thanks for the analysis and all the testing. Locally verified against glibc-2.34. Pushed as: commit 7b5867b1fda1dbadc1291988828f6d6ad9438144 Author: Mark Wielaard <mark@klomp.org> Date: Fri Apr 8 14:58:38 2022 +0200 helgrind reports false races for printfs using mempcpy on FILE* state We already have a suppression for helgrind which is for when glibc uses __GI_mempcpy to manipulate internal FILE state (this was bug 352130). But since glibc-2.26 mempcpy is used instead __GI_mempcpy, making the suppresion from the original bug obsolete. This patch adds a new suppression using mempcpy but doesn't replace the original suppression for older systems. Patch adding suppression + testcase by Jesus Checa <jcheca@redhat.com> https://bugs.kde.org/show_bug.cgi?id=450962 commit 4c27f0f7649eb02336dcd0af9d2f8977b20d3a9f Author: Mark Wielaard <mark@klomp.org> Date: Mon Apr 11 14:45:49 2022 +0200 Extend helgrind suppression for _IO_*xsputn* FILE* state manipulation commit 7b5867b1f "helgrind reports false races for printfs using mempcpy on FILE* state" extended the helgrind-glibc-io-xsputn suppression by also covering mempcpy (instead of __GI_mempcpy). The test added in that commit exposed a couple of other variants of this suppression where _IO_*xsputn* called memcpy (instead of mempcpy) and/or had an extra indirection/function in between. Replace the two two suppressions with one that covers all cases where _IO_*xsputn* *mem*cpy variants with possibly another ... function in between. https://bugs.kde.org/show_bug.cgi?id=450962 |