all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kai Tetzlaff <kai.tetzlaff@web.de>
To: emacs-devel@gnu.org
Subject: commit 108757 breaks clang build on os x
Date: Fri, 29 Jun 2012 09:24:26 +0200	[thread overview]
Message-ID: <7ifw9epolx.fsf@mack.tetzco.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]


The following lines in alloc.c

  #ifdef __clang__
    /* Do not allow -faddress-sanitizer to check this function, since it
       crosses the function stack boundary, and thus would yield many
       false positives. */
    __attribute__((no_address_safety_analysis))
  #endif

break the build on os x using

  $ clang --version
  Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
  Target: x86_64-apple-darwin10.8.0
  Thread model: posix

It seems that

  __attribute__((no_address_safety_analysis))

is not supported by all clang versions. The attached patch contains an
improved version of the check which hopefully fixes the problem (it does
so here).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: alloc.c: fix check for clang feature --]
[-- Type: text/x-patch, Size: 465 bytes --]

=== modified file 'src/alloc.c'
--- src/alloc.c	2012-06-28 19:09:41 +0000
+++ src/alloc.c	2012-06-29 06:53:41 +0000
@@ -4608,7 +4608,7 @@
 
 static void
 mark_memory (void *start, void *end)
-#ifdef __clang__
+#if defined (__clang__) && defined (__has_feature) && __has_feature(address_sanitizer)
   /* Do not allow -faddress-sanitizer to check this function, since it
      crosses the function stack boundary, and thus would yield many
      false positives. */


             reply	other threads:[~2012-06-29  7:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-29  7:24 Kai Tetzlaff [this message]
2012-06-29 22:20 ` commit 108757 breaks clang build on so x John Wiegley

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=7ifw9epolx.fsf@mack.tetzco.de \
    --to=kai.tetzlaff@web.de \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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.