public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
Date: Sun, 14 Oct 2012 16:23:00 -0000	[thread overview]
Message-ID: <bug-54691-4-eP8SZVatL7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54691-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2012-10-14 16:23:04 UTC ---
Created attachment 28445
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28445
Prototype patch that introduces VALGRIND_MAKE_MEM_DEFINED

Attached prototype patch builds on HJ's patch. The patch detects valgrind in
the same way as in gcc directory (actually, it just copies relevant bits) and
changes:

+      memset (to.text + to.len + 1, 0, 16);

to

+      VALGRIND_DISCARD (VALGRIND_MAKE_MEM_DEFINED (to.text + to.len + 1, 16));

(BTW: Probably, we should align end of buffer to 16 byte boundary instead of
hardcoding 16.)

(BTW2: the test in the following code in the patch is obviously wrong:

+if test $enable_checking != no ; then
+  # It is certainly possible that there's valgrind but no valgrind.h.
+  # GCC relies on making annotations so we must have both.
+  AC_MSG_CHECKING(for VALGRIND_DISCARD in <valgrind/memcheck.h>)
+  AC_PREPROC_IFELSE([AC_LANG_SOURCE(
...)


  parent reply	other threads:[~2012-10-14 16:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 12:19 [Bug other/54691] New: " markus at trippelsdorf dot de
2012-09-24 18:45 ` [Bug other/54691] " zsojka at seznam dot cz
2012-10-11 18:22 ` hjl.tools at gmail dot com
2012-10-12 14:08 ` hjl.tools at gmail dot com
2012-10-12 16:48 ` hjl.tools at gmail dot com
2012-10-12 17:06 ` ubizjak at gmail dot com
2012-10-12 18:46 ` markus at trippelsdorf dot de
2012-10-14 16:23 ` ubizjak at gmail dot com [this message]
2012-10-14 19:23 ` hjl.tools at gmail dot com
2012-10-15  7:00 ` ubizjak at gmail dot com
2012-10-15  7:06 ` pinskia at gcc dot gnu.org
2012-10-15  7:19 ` hjl.tools at gmail dot com
2012-11-25 15:52 ` rguenth at gcc dot gnu.org
2012-11-25 22:15 ` hjl.tools at gmail dot com
2012-12-03 17:20 ` jakub at gcc dot gnu.org
2012-12-03 17:29 ` jakub at gcc dot gnu.org

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=bug-54691-4-eP8SZVatL7@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).