From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by sourceware.org (Postfix) with ESMTPS id EAE5E3858D33 for ; Tue, 27 Jun 2023 06:15:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EAE5E3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687846538; x=1719382538; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=TXajtaFygJYJXYNg8JlhWTkYUddVpm1P5n8ezTDQOpE=; b=aMCLG7gBB/6vyKdH90E2Lcnz0n05TJAGtXYzY9YMYJzXOOE+4lNhvCLc CnNswh+ksx/9QqF71k5XLUJy+z8FzSd6XsIKOd4ACYitEXS/+3Lz61JoL TEBxZbuTfTr3ajWpxeAHFnHFm7MgZFmNyjYxf6v0Was5wzsmfBJlgJBfP 4g7ReTdaC9bvl3rrX0PNqsIQcGOBtZqL8SuHcj9NjPdi0Yf1yFGv7WvZL grWQIacyfCHdS4WUn5Useot2MFl/uHIQWvEoHzch+kSpbea1KcfIBRXwm sFixgXptNtx+fhq3aSWFjYJ0fbmlQml3jnOSAVq/O9npjssio3fM3xOq7 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="341828114" X-IronPort-AV: E=Sophos;i="6.01,161,1684825200"; d="scan'208";a="341828114" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 23:15:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="806330934" X-IronPort-AV: E=Sophos;i="6.01,161,1684825200"; d="scan'208";a="806330934" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jun 2023 23:15:15 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 26 Jun 2023 23:15:15 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Mon, 26 Jun 2023 23:15:15 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.172) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Mon, 26 Jun 2023 23:15:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g27I46Si4kI9NU3ONSSz9NlM+/p2bqjoWRLd1dFvEmsSRnZt/urd9kW1QFNyqgXdi+IK3SQgbLaMivNkipDn0s6VFrJJyWy/JsYIBDHYtn3epBQXol7U0TfYh6hxjsa+ZL+U5c1aAMBG3phRA6NxQLvoHg8HjcvyKHHYem14lRTiDjQ/CNHnkCKFVCeGdqa2TajOaiIlXydO9F0vEuSQkPbkuN9lJFbgUtrK2QrlEHntgfIyIMMPG+tL/hKJHuJxkOLyGPHcwPt1e2pa+5KCT5NC9lJ2ND9H7ty38aEBXqp0KcpGQQzgZl1e06XWLKLhLKX1yKIzUPjSyBIY7f5v7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+8zmEhRTFXPD5pmxVViWSnKVtlrdHoj28yV4iy94qHQ=; b=IKLeuCuI3NswbYnG7LJJi7fXlJeHD4usJXv/i5G1oYipBcOCu/jyiDVtTxV4O8fBk+REt6k2DmKSNKVUHEzWabk/yDO/eyZkYGEmvdr92HvBySrzRzs9BQczTfCfNWovSksXhiLV02ZD0aneAeiOzqHMHOyMDrT00jFf3DKb+fBuZeq9U5G3zVJ4LQARufb36qPFpYJYCnzdqLyWGmUQYZrk6BcEoY7Uu6Kl87MyqacxOWl7c9rs1PPN0jlxPYSHNwiSvvvx4TEay8BCzPbfn+hxMzaLkGk7+6xW4a7ibxceLaLH2mbPZS1+eLSj9IWbWrqKpV9Rr5CNvGfnGrA8yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW5PR11MB5908.namprd11.prod.outlook.com (2603:10b6:303:194::10) by IA1PR11MB6100.namprd11.prod.outlook.com (2603:10b6:208:3d4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Tue, 27 Jun 2023 06:15:12 +0000 Received: from MW5PR11MB5908.namprd11.prod.outlook.com ([fe80::127c:f4cc:e699:8f73]) by MW5PR11MB5908.namprd11.prod.outlook.com ([fe80::127c:f4cc:e699:8f73%6]) with mapi id 15.20.6521.023; Tue, 27 Jun 2023 06:15:12 +0000 From: "Li, Pan2" To: Li Xu , "gcc-patches@gcc.gnu.org" CC: "kito.cheng@gmail.com" , "palmer@dabbelt.com" , "juzhe.zhong@rivai.ai" , "zhengyu@eswincomputing.com" Subject: RE: [PATCH] Extend streamer_mode_table size to MACHINE_MODE_BITSIZE. Thread-Topic: [PATCH] Extend streamer_mode_table size to MACHINE_MODE_BITSIZE. Thread-Index: AQHZqL5bBxN8IDQickWzKbGJ6QEICa+eK57g Date: Tue, 27 Jun 2023 06:15:11 +0000 Message-ID: References: <20230627061148.24656-1-xuli1@eswincomputing.com> In-Reply-To: <20230627061148.24656-1-xuli1@eswincomputing.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW5PR11MB5908:EE_|IA1PR11MB6100:EE_ x-ms-office365-filtering-correlation-id: f83ff9df-ac85-4f1a-f260-08db76d5dd8d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bkcCwR4gqrCnMZYaqnCnOPzBwZzvgm1DJVOKIUgB02u0FtxafS2NEN6P5eqheO3xfXuOux0vtzSn8xata5sotYaBYlilOTAacBGzNGsvbX8P+zvqizaM2HhdeX/YTfEcaDTbpTAtHz60aQf34I3Aj0MwqtUIx2hqhQRp9KWYIXLIjrjm7aB55EHsqOFfQKMc1o67c2KBq+1KZhoFKvtS4o1Fb8RMy//81jDwVlm7/WJLBy+MJhcX7VYypYBIZzF4EkKWWIOtB/JDp5VCh0uu8pnrDS+eXD0C+0zHdmdO56qTwMKLipV1VNB4wCahQuh9OAnXAL1fgcnkbJhoZf7HGcyEbVqe1G03dYkPWGdCGq+kjI5vBTEDJypK+lMNCRf3woInk5et2STWcnfCpZisf82Dpv/G9jly/MPRFjCwFEctbodhQWlKE7kdI0fd1SatiYrUO8MF30mwiJScJbIXrSPDdwIa00BYowVNoAn4Rxo5G5MR/DOXmJKV+qud14eiUce04fC1lkFWtvVOEEdtyVU2U4rYUO/yRKTZHprCnTlG3HcwySFz5mlJ5Keh5XOk47uvGiG74+it2uYihyCMlVvEH5pM9qLnCBZirfiWZmg= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR11MB5908.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(346002)(376002)(366004)(136003)(39860400002)(451199021)(82960400001)(38100700002)(122000001)(38070700005)(83380400001)(33656002)(86362001)(54906003)(110136005)(7696005)(71200400001)(966005)(41300700001)(66446008)(66556008)(66946007)(55016003)(76116006)(64756008)(66476007)(316002)(8676002)(8936002)(26005)(53546011)(6506007)(9686003)(4326008)(186003)(2906002)(478600001)(52536014)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?j/FPiMgEOwsaVG+8ZNCBxqgdYrtu0+JhGj5n1JhYUDD10JzkckLewI7YNzJQ?= =?us-ascii?Q?846fiC1GJyiRJbJBuNodRvjq8LL7oKgK+mz3nUedRthx7+va6QCjGljYEXkO?= =?us-ascii?Q?NFtpjyhHiKDmEjRRxNwhMyrtFIECmLfJsDp/TUQ5lstCnC8tKwtwBjvssQjj?= =?us-ascii?Q?D0NNTH7M2MIkzYnYr5vT/sDnqW3TvD9bgDk/xPmcB6hhv1M7sGBvSZZDWsYQ?= =?us-ascii?Q?gOs0teh0rwquNML2xbCiVqBr7So/wCXK+HAm0jp81QPLu2spUJeMi7sOxU7d?= =?us-ascii?Q?HBVOYmLV6MvyZXK+OElqmA84GPVgmMvj1vFOwAXxsCu3Eyn8a1TfRodHBru0?= =?us-ascii?Q?Wms3toI/HnrJXIWuzeoiMQM7+U/6uby+y2GOBKPaN+oEFFpN/5/yH+RgZOK6?= =?us-ascii?Q?coi5JhohbmzIewaH4GUagVascNzWz7IiSHUQT3X8R48AX03rO0ioWAkc3URR?= =?us-ascii?Q?f3wjHjcvShBlxrb4RX5H0JEFu7yawwzWJ/STPW8/vLlUQT07wuRpNVWhgdYJ?= =?us-ascii?Q?2EisLq5RIFemppSEFBvQMX24U0WnAy4/ctrONb5Uy8rT+gm1JeH4/Yq55Ico?= =?us-ascii?Q?8F8yFC36a+TYQ8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m0I7s5hXS3ox6rvZrBUE?= =?us-ascii?Q?Gf8BGoqLAplS0QvJKLsQ5kcT0ccX460I0kYjPe0ybMEicYCrG1AUh/1qh6ni?= =?us-ascii?Q?Y67lexzDbtjN2uJreXg=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5908.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f83ff9df-ac85-4f1a-f260-08db76d5dd8d X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2023 06:15:12.0019 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Fi8Niew9gQO7NzCRxseG2mKsGWSki4KikLYLrcSXtbh6AbjpslCZqz8X/MELI/W0XXzsyTxAEMslSZsFlfp9DQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6100 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Thanks Xu for locating this, we have one similar PATCH under reviewing/test= ing as below. https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622440.html Pan -----Original Message----- From: Li Xu =20 Sent: Tuesday, June 27, 2023 2:12 PM To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com; palmer@dabbelt.com; juzhe.zhong@rivai.ai; zhengyu= @eswincomputing.com; Li, Pan2 ; Li Xu Subject: [PATCH] Extend streamer_mode_table size to MACHINE_MODE_BITSIZE. If MAX_MACHINE_MODE exceeds 8bits, a warning will appear in the following c= ode. waring: writing 293 bytes into a region of size 256 overflows the destinati= on gcc/lto-streamer-out.cc void lto_output_init_mode_table (void) { memset (streamer_mode_table, '\0', MAX_MACHINE_MODE); } gcc/ChangeLog: * tree-streamer.cc: Extend streamer_mode_table size to MACHINE_MODE= _BITSIZE. * tree-streamer.h: Ditto. --- gcc/tree-streamer.cc | 2 +- gcc/tree-streamer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/tree-streamer.cc b/gcc/tree-streamer.cc index ed65a7692e3..14c222698bf 100644 --- a/gcc/tree-streamer.cc +++ b/gcc/tree-streamer.cc @@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see During streaming in, we translate the on the disk mode using this table. For normal LTO it is set to identity, for ACCEL_COMPILER depending on the mode_table content. */ -unsigned char streamer_mode_table[1 << 8]; +unsigned char streamer_mode_table[1 << MACHINE_MODE_BITSIZE]; =20 /* Check that all the TS_* structures handled by the streamer_write_* and streamer_read_* routines are exactly ALL the structures defined in diff --git a/gcc/tree-streamer.h b/gcc/tree-streamer.h index 170d61cf20b..8bc757be189 100644 --- a/gcc/tree-streamer.h +++ b/gcc/tree-streamer.h @@ -75,7 +75,7 @@ void streamer_write_tree_body (struct output_block *, tre= e); void streamer_write_integer_cst (struct output_block *, tree); =20 /* In tree-streamer.cc. */ -extern unsigned char streamer_mode_table[1 << 8]; +extern unsigned char streamer_mode_table[1 << MACHINE_MODE_BITSIZE]; void streamer_check_handled_ts_structures (void); bool streamer_tree_cache_insert (struct streamer_tree_cache_d *, tree, hashval_t, unsigned *); --=20 2.17.1