From nobody Sun Nov 21 18:29:18 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3CAD6189E0EA; Sun, 21 Nov 2021 18:29:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HxzT05Rv8z3KLv; Sun, 21 Nov 2021 18:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C3EF14348; Sun, 21 Nov 2021 18:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ALITI9n086187; Sun, 21 Nov 2021 18:29:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALITIb7086186; Sun, 21 Nov 2021 18:29:18 GMT (envelope-from git) Date: Sun, 21 Nov 2021 18:29:18 GMT Message-Id: <202111211829.1ALITIb7086186@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: c3ff309608cf - main - devel/google-perftools: Add LD_32_PRELOAD to the valgrind detection code List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3ff309608cf29a11b0985a6e50e7924ff280c0c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=c3ff309608cf29a11b0985a6e50e7924ff280c0c commit c3ff309608cf29a11b0985a6e50e7924ff280c0c Author: Yuri Victorovich AuthorDate: 2021-11-21 18:25:53 +0000 Commit: Yuri Victorovich CommitDate: 2021-11-21 18:29:16 +0000 devel/google-perftools: Add LD_32_PRELOAD to the valgrind detection code Suggested by: Paul Floyd --- devel/google-perftools/Makefile | 2 +- devel/google-perftools/files/patch-src_base_dynamic__annotations.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/devel/google-perftools/Makefile b/devel/google-perftools/Makefile index f8b0d79c6900..303c5d6cc575 100644 --- a/devel/google-perftools/Makefile +++ b/devel/google-perftools/Makefile @@ -3,7 +3,7 @@ PORTNAME= google-perftools DISTVERSIONPREFIX= gperftools- DISTVERSION= 2.9.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= https://github.com/gperftools/gperftools/releases/download/gperftools-${PORTVERSION}/ DISTNAME= gperftools-${PORTVERSION} diff --git a/devel/google-perftools/files/patch-src_base_dynamic__annotations.c b/devel/google-perftools/files/patch-src_base_dynamic__annotations.c index e02b1a5f5afe..3850e05461a5 100644 --- a/devel/google-perftools/files/patch-src_base_dynamic__annotations.c +++ b/devel/google-perftools/files/patch-src_base_dynamic__annotations.c @@ -3,13 +3,15 @@ --- src/base/dynamic_annotations.c.orig 2021-02-15 06:44:21 UTC +++ src/base/dynamic_annotations.c -@@ -43,6 +43,19 @@ +@@ -43,6 +43,21 @@ #include "base/dynamic_annotations.h" #include "getenv_safe.h" // for TCMallocGetenvSafe +static int running_on_valgrind_preload = -1; +void __attribute__ ((constructor)) premain() { + char *LD_PRELOAD = getenv("LD_PRELOAD"); ++ if (LD_PRELOAD == NULL) ++ LD_PRELOAD = getenv("LD_32_PRELOAD"); + running_on_valgrind_preload = LD_PRELOAD != NULL && + ( + strstr(LD_PRELOAD, "/valgrind/") != NULL @@ -23,7 +25,7 @@ static int GetRunningOnValgrind(void) { #ifdef RUNNING_ON_VALGRIND if (RUNNING_ON_VALGRIND) return 1; -@@ -51,6 +64,11 @@ static int GetRunningOnValgrind(void) { +@@ -51,6 +66,11 @@ static int GetRunningOnValgrind(void) { if (running_on_valgrind_str) { return strcmp(running_on_valgrind_str, "0") != 0; }