From: Stefan Seyfried <stefan.seyfried@googlemail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: BlueZ devel list <linux-bluetooth@vger.kernel.org>,
Gowtham Anandha Babu <gowtham.ab@samsung.com>
Subject: Re: unit/test-gatt broken again (as always :-)
Date: Wed, 01 Apr 2015 22:15:30 +0200 [thread overview]
Message-ID: <551C51E2.7060806@message-id.googlemail.com> (raw)
In-Reply-To: <CABBYNZ+EzzcX2uMMrSQvrPhMqnruDxLf5d-vfqHNcZJOD=BCuA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 839 bytes --]
Hi Luiz,
Am 01.04.2015 um 14:08 schrieb Luiz Augusto von Dentz:
> This is actually a fault in our code that the test uncovered which is
> good but we failed to see it happening, I actually have some plans to
Ok. Then it's good that the openSUSE Buildservice setup has these
parameters set as default for building :-)
> have a check-valgrind target to catch this type of problems or maybe
> there is a way to add MALLOC_CHECK_=3 MALLOC_PERTURB_=69 directly.
I can help with that, see attached patch (sorry for the attachment, but
making thunderbird behave well is out of scope for now :-)
Best regards,
Stefan
--
Stefan Seyfried
Linux Consultant & Developer -- GPG Key: 0x731B665B
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
[-- Attachment #2: 0001-enable-glibc-s-malloc-checks-for-the-test-suite.patch --]
[-- Type: text/x-patch, Size: 947 bytes --]
>From f76391a35bd168a31d62ab0ea16dfdc3bdeb52e1 Mon Sep 17 00:00:00 2001
From: Stefan Seyfried <seife+dev@b1-systems.com>
Date: Wed, 1 Apr 2015 22:04:41 +0200
Subject: [PATCH] enable glibc's malloc checks for the test suite
Setting MALLOC_CHECK_=3 causes additional checks in glibc for malloc()
usage errors, abort()ing the test if those trigger. MALLOC_PERTURB_=69
causes free()'d memory to be poisoned with 0x45, leading to crashes in
case of use-after-free.
Together, both are useful for spotting more errors during "make check"
Signed-off-by: Stefan Seyfried <seife+dev@b1-systems.com>
---
Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.am b/Makefile.am
index 2255ce8..b6beb42 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -413,6 +413,7 @@ noinst_PROGRAMS += $(unit_tests)
endif
TESTS = $(unit_tests)
+AM_TESTS_ENVIRONMENT = MALLOC_CHECK_=3 MALLOC_PERTURB_=69
pkgconfigdir = $(libdir)/pkgconfig
--
2.3.3
next prev parent reply other threads:[~2015-04-01 20:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 11:42 unit/test-gatt broken again (as always :-) Stefan Seyfried
2015-04-01 12:08 ` Luiz Augusto von Dentz
2015-04-01 12:23 ` Gowtham Anandha Babu
2015-04-01 20:15 ` Stefan Seyfried [this message]
2015-04-02 8:14 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=551C51E2.7060806@message-id.googlemail.com \
--to=stefan.seyfried@googlemail.com \
--cc=gowtham.ab@samsung.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.