public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sandbox:master commit in: libsbutil/
Date: Sun, 20 Sep 2015 08:15:27 +0000 (UTC)	[thread overview]
Message-ID: <1442730925.7e7a7a025dd2d43daf0b8ca14135e14bcaf871ce.vapier@gentoo> (raw)

commit:     7e7a7a025dd2d43daf0b8ca14135e14bcaf871ce
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 06:35:25 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 06:35:25 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=7e7a7a02

libsbutil: undef memory redirect calls

Sometimes the C library will redirect a call to strdup to __strdup which
breaks when we're using the libsandbox memory allocator.  This was fixed
in libsandbox in commit d7801453aced46a6f31d8455877edeb31a5211cc, but we
didn't notice in libsbutil as no calls to strdup happened to come up.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 libsbutil/sb_memory.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libsbutil/sb_memory.c b/libsbutil/sb_memory.c
index bdc054f..ebc1c8e 100644
--- a/libsbutil/sb_memory.c
+++ b/libsbutil/sb_memory.c
@@ -11,6 +11,12 @@
 #include "headers.h"
 #include "sbutil.h"
 
+/* Make sure the C library doesn't rewrite calls to funcs libsandbox provides. */
+#undef calloc
+#undef malloc
+#undef realloc
+#undef strdup
+
 void *
 __xcalloc(size_t nmemb, size_t size, const char *file, const char *func, size_t line)
 {


             reply	other threads:[~2015-09-20  8:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-20  8:15 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-09 18:09 [gentoo-commits] proj/sandbox:master commit in: libsbutil/ Mike Gilbert
2023-07-17 13:54 Mike Gilbert
2021-11-05 10:25 Mike Frysinger
2021-11-03 21:10 Andreas K. Hüttel
2021-11-03  4:59 Mike Frysinger
2021-10-18  8:48 Mike Frysinger
2016-11-27 18:31 Mike Frysinger
2016-01-18  6:18 Mike Frysinger
2015-12-20  8:41 Mike Frysinger
2015-09-11  7:53 Mike Frysinger
2015-09-11  7:53 Mike Frysinger
2015-09-11  7:53 Mike Frysinger
2013-02-25  4:08 Mike Frysinger
2012-12-24  5:23 Mike Frysinger
2012-12-24  5:19 Mike Frysinger
2012-11-26 10:10 Mike Frysinger

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=1442730925.7e7a7a025dd2d43daf0b8ca14135e14bcaf871ce.vapier@gentoo \
    --to=vapier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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