diff mbox

[12/21] PR jit/63854: Add a valgrind suppresion file

Message ID 1416393981-39626-13-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm Nov. 19, 2014, 10:46 a.m. UTC
Valgrind complains about uninitialized data within sparseset_bit_p.
Provide a suppression file to silence these warnings.

Valgrind requires suppression files for C++ code to use the mangled
names, so we do that here.

contrib/ChangeLog:
	PR jit/63854
	* valgrind.supp: New.
---
 contrib/valgrind.supp | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 contrib/valgrind.supp

Comments

Richard Biener Nov. 19, 2014, 11:47 a.m. UTC | #1
On Wed, Nov 19, 2014 at 11:46 AM, David Malcolm <dmalcolm@redhat.com> wrote:
> Valgrind complains about uninitialized data within sparseset_bit_p.
> Provide a suppression file to silence these warnings.
>
> Valgrind requires suppression files for C++ code to use the mangled
> names, so we do that here.

There is --enable-valgrind-annotations to get the same effect by GCC
telling valgrind about this (and more).

Richard.

> contrib/ChangeLog
>         PR jit/63854
>         * valgrind.supp: New.
> ---
>  contrib/valgrind.supp | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>  create mode 100644 contrib/valgrind.supp
>
> diff --git a/contrib/valgrind.supp b/contrib/valgrind.supp
> new file mode 100644
> index 0000000..ec9ff02
> --- /dev/null
> +++ b/contrib/valgrind.supp
> @@ -0,0 +1,11 @@
> +{
> +   suppress-uninit-cond-with-sparseset_bit_p
> +   Memcheck:Cond
> +   fun:_ZL15sparseset_bit_pP13sparseset_defm
> +}
> +
> +{
> +   suppress-uninit-use-with-sparseset_bit_p
> +   Memcheck:Value8
> +   fun:_ZL15sparseset_bit_pP13sparseset_defm
> +}
> --
> 1.8.5.3
>
Jeff Law Nov. 19, 2014, 5:09 p.m. UTC | #2
On 11/19/14 04:47, Richard Biener wrote:
> On Wed, Nov 19, 2014 at 11:46 AM, David Malcolm <dmalcolm@redhat.com> wrote:
>> Valgrind complains about uninitialized data within sparseset_bit_p.
>> Provide a suppression file to silence these warnings.
>>
>> Valgrind requires suppression files for C++ code to use the mangled
>> names, so we do that here.
>
> There is --enable-valgrind-annotations to get the same effect by GCC
> telling valgrind about this (and more).
Right.  See VALGRIND_DISCARD.  Is that not covering this case?


Jeff
David Malcolm Nov. 19, 2014, 5:12 p.m. UTC | #3
On Wed, 2014-11-19 at 10:09 -0700, Jeff Law wrote:
> On 11/19/14 04:47, Richard Biener wrote:
> > On Wed, Nov 19, 2014 at 11:46 AM, David Malcolm <dmalcolm@redhat.com> wrote:
> >> Valgrind complains about uninitialized data within sparseset_bit_p.
> >> Provide a suppression file to silence these warnings.
> >>
> >> Valgrind requires suppression files for C++ code to use the mangled
> >> names, so we do that here.
> >
> > There is --enable-valgrind-annotations to get the same effect by GCC
> > telling valgrind about this (and more).
> Right.  See VALGRIND_DISCARD.  Is that not covering this case?

I simply didn't spot the option, and was running without it.

I'll drop the new file, and document that people running the jit
testsuite under valgrind need to use that configure option.
Hans-Peter Nilsson Jan. 10, 2015, 12:46 a.m. UTC | #4
On Wed, 19 Nov 2014, David Malcolm wrote:

> On Wed, 2014-11-19 at 10:09 -0700, Jeff Law wrote:
> > On 11/19/14 04:47, Richard Biener wrote:
> > > On Wed, Nov 19, 2014 at 11:46 AM, David Malcolm <dmalcolm@redhat.com> wrote:
> > >> Valgrind complains about uninitialized data within sparseset_bit_p.
> > >> Provide a suppression file to silence these warnings.
> > >>
> > >> Valgrind requires suppression files for C++ code to use the mangled
> > >> names, so we do that here.
> > >
> > > There is --enable-valgrind-annotations to get the same effect by GCC
> > > telling valgrind about this (and more).
> > Right.  See VALGRIND_DISCARD.  Is that not covering this case?
>
> I simply didn't spot the option, and was running without it.
>
> I'll drop the new file, and document that people running the jit
> testsuite under valgrind need to use that configure option.

IMHO, making --enable-valgrind-annotations the default when
headers are found and when in gcc development is in DEV-PHASE =
experimental (i.e. not for releases) would be even better.
Anyone opposed?  I thought it already was the default!

The overhead is IIRC a few weird NOP instructions per
VALGRIND_DISCARD (& Co.) annotation.

brgds, H-P
(PS. I care a little bit since I added them in the first place.)
diff mbox

Patch

diff --git a/contrib/valgrind.supp b/contrib/valgrind.supp
new file mode 100644
index 0000000..ec9ff02
--- /dev/null
+++ b/contrib/valgrind.supp
@@ -0,0 +1,11 @@ 
+{
+   suppress-uninit-cond-with-sparseset_bit_p
+   Memcheck:Cond
+   fun:_ZL15sparseset_bit_pP13sparseset_defm
+}
+
+{
+   suppress-uninit-use-with-sparseset_bit_p
+   Memcheck:Value8
+   fun:_ZL15sparseset_bit_pP13sparseset_defm
+}