From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from paperclip.tbsaunde.org (tbsaunde.org [66.228.47.254]) by sourceware.org (Postfix) with ESMTP id C297D383B431 for ; Wed, 30 Jun 2021 05:35:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C297D383B431 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tbsaunde.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tbsaunde.org Received: from caber.home (pool-108-24-42-131.cmdnnj.fios.verizon.net [108.24.42.131]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id 9DDBAC0FC; Wed, 30 Jun 2021 05:35:49 +0000 (UTC) From: Trevor Saunders To: gcc-patches@gcc.gnu.org Cc: Trevor Saunders Subject: [PATCH 4/4] poison input_location and cfun in one spot Date: Wed, 30 Jun 2021 01:35:28 -0400 Message-Id: <20210630053529.26581-4-tbsaunde@tbsaunde.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210630053529.26581-1-tbsaunde@tbsaunde.org> References: <20210630053529.26581-1-tbsaunde@tbsaunde.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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-List-Received-Date: Wed, 30 Jun 2021 05:35:50 -0000 This simply confirms we can poison them in a small region. boostrapped and regtested on x86_64-linux-gnu, ok? Trev gcc/ChangeLog: * gimple-range.cc (disable_ranger): Prevent access to cfun and input_location. --- gcc/gimple-range.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc index 1851339c528..d4a3a6e46be 100644 --- a/gcc/gimple-range.cc +++ b/gcc/gimple-range.cc @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "poison.h" #include "backend.h" #include "tree.h" #include "gimple.h" @@ -509,6 +510,8 @@ enable_ranger (struct function *fun) void disable_ranger (struct function *fun) { + auto_poison pil (input_location); + auto_poison pcfun (cfun_poison); delete fun->x_range_query; fun->x_range_query = &global_ranges; -- 2.20.1