From patchwork Mon Mar 20 06:07:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reini Urban X-Patchwork-Id: 71997 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1041346wrt; Sun, 19 Mar 2023 23:08:51 -0700 (PDT) X-Google-Smtp-Source: AK7set8cIwtCEAsxg7jU/NtRbfEnxk6ALvQZxixm8tMTzLsV5tBh7D/ozTeMGjCgKUBoOBoKqd9u X-Received: by 2002:a17:906:693:b0:933:422b:5f5d with SMTP id u19-20020a170906069300b00933422b5f5dmr6777789ejb.18.1679292531530; Sun, 19 Mar 2023 23:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679292531; cv=none; d=google.com; s=arc-20160816; b=vuVMC/qQU99M2gdADlmUl7T23Ds/yMcQfw7EKiNwtJ4xhqscJBELNEfcNrXsK9fKR8 cQQCYYyOz75gtLH+AoNtGGKSlh/brPv6XX6OF3WTx9TpZkmeh8KCNPHp+fZ1bCwAXNkC +zh33T0ruVgeh68I7DrYbe/HCvPX3RUXt2NFLTxXv/n6mELtPB9q6MpqLIXicz9eXikl ifnn03v+F5F3I9XiTFaSsng/OXXyB1j6TRD2Rufz0C9wzfIwPNDkHFMd/dpPtLvjqssB WSolGVFfBceSObaTlVEUgWPQfMkUhnFKgV21LKmg4u5PHkS+qoYETiaQqsS/JLyYKeE+ YIHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:to:subject :message-id:date:mime-version:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=3MSYltlPPG7PaZuoJ57NZ5tPf1aGdDpAbZYE4E6zoeo=; b=jsCNiiy8bxg9XHNeFCENtSCV/FQW6PiqDEagM/RoIulOl54lnVvT+q5KdnoWf0mxoX vttqS7zJJPgRiMRQFHgHviDj8tsNgJ7SKOmk68Dhgz2FtpMpRs/yFbD1h56OvFkY4YXH ykV4sYp8wNMjZ7VenLfLZ7bjaDzUR8DrKoe+Mxytg3+RJT1gdx0/9qAgP9a6R2GbeGvi Di3E//7WIQVn+Sjf1sSxzDo+2OLt+tmpvaGFl6G7Cm5SAdDLhlEIGtNMYWOWvijm+Y0o krQNpCYe0yiZIfoh6jgpHB03V85ylmSmTP5Yp7nBXI24wo7XlbnM20GojfjexSA9OZkJ pkvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jW0o+0YN; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a11-20020a170906244b00b008dffd95e783si8471514ejb.568.2023.03.19.23.08.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 23:08:51 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jW0o+0YN; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 629F43858C2F for ; Mon, 20 Mar 2023 06:08:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 629F43858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679292530; bh=3MSYltlPPG7PaZuoJ57NZ5tPf1aGdDpAbZYE4E6zoeo=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jW0o+0YNmX7TRk2qcs7rXNMAyu8a/SELh+a1EZ+9e/Ydaf6yM+jLTYIcykYasvMoZ dRE8gpwCilr5gFUrBeGUjIIZ2vKg9I3yv0B0EGOXuwEYrLuV1Y1oIZgC32fII4bAiS HPAIqtlrRZk3O1kYnT37p8Dd0A1kMhmFEIMm2cK4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 1553D3858C53 for ; Mon, 20 Mar 2023 06:08:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1553D3858C53 Received: by mail-ed1-x533.google.com with SMTP id y4so42370426edo.2 for ; Sun, 19 Mar 2023 23:08:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679292484; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=sZwCLJTgnBmUv/5NzuarX2oSjZRwXtM33+bMJubTLiY=; b=hZSP4l/7U0WAoI4G2IanxUnw56Co5oYDllcuQTaKMkm0DQbYRCopvk44CQAovKwve+ dUdrpr5oHCiMhe5jeDwjN2XAFrwf+RzaMfjSF4jhxx21MHBywYyrAeCws1/H9FKuQQEJ jUPR22cK9BGJCNfwCwBPH9sdesSnJ9c+bXlPrx3x4NsV36DrMp/L6I1ulFLtiNx1p4+c dpBSyRVyGcXqZQQg641xrCDTQysCseBPZACkn/U6FpFOBt7WZ9V0P4gltOtvp4W3yDDP Wh1qmsr81ZeMcS+diQ8udMD76eLGw3TxQN3ldzdTjpir2rmeOjfbsWTCsNsRlpQEWR5/ 7AzQ== X-Gm-Message-State: AO0yUKUAOcicweODrCEWhf83fC4tKkZLdG4+SPhvJ1f/C0FvQBL6horn btS8h9TpSIXXIw+UkcP0SFJWAHDUu5VQ+dLWRKcbzvH1Bis= X-Received: by 2002:a50:cd1d:0:b0:4fc:8749:cd77 with SMTP id z29-20020a50cd1d000000b004fc8749cd77mr5746158edi.3.1679292484018; Sun, 19 Mar 2023 23:08:04 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 20 Mar 2023 07:07:52 +0100 Message-ID: Subject: [PATCH] fix for __sanitizer_struct_mallinfo with mallinfo2 To: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, HTML_MESSAGE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Reini Urban via Gcc-patches From: Reini Urban Reply-To: Reini Urban Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760865845341082776?= X-GMAIL-MSGID: =?utf-8?q?1760865845341082776?= Fix sanititzers with mallinfo2 e.g fedora already uses mallinfo2 with long v[10]; From 6e1ab452bcf2bae0be20faf65966c8ee2f755a2b Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Sun, 20 Feb 2022 18:27:15 +0100 Subject: [PATCH 2/2] gcc: fixup report_heap_memory_use() without mallinfo2 decl gcc/ChangeLog: * gcc/ggc-common.cc (report_heap_memory_use): fix without mallinfo2 decl Signed-off-by: Reini Urban --- gcc/ggc-common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git gcc/ggc-common.cc gcc/ggc-common.cc index db317f49993..9cd446995f8 100644 --- gcc/ggc-common.cc +++ gcc/ggc-common.cc @@ -1276,7 +1276,7 @@ void report_heap_memory_use () { #if defined(HAVE_MALLINFO) || defined(HAVE_MALLINFO2) -#ifdef HAVE_MALLINFO2 +#if defined HAVE_MALLINFO2 && HAVE_DECL_MALLINFO2 #define MALLINFO_FN mallinfo2 #else #define MALLINFO_FN mallinfo -- 2.34.1