From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 758C83858D38 for ; Fri, 14 Oct 2022 17:04:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 758C83858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.95,184,1661846400"; d="scan'208";a="87540523" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 14 Oct 2022 09:04:14 -0800 IronPort-SDR: rZz40vDIwD2DSXYm7pPq2XcK/AXneLqSHgC31UQ2f4jfqpiVIwJvimi1vI0Dh5jAdsBkMMT5a4 Q86ZMHNQBAan9kxnPzcJrp43WL/qes7AaiPiCXBZc43rgHgEjjpHvC2EWkb9QNdahFKJ4qCCa6 0l3tZLLLeKbg11uI2KNaP32MJSR+WYDMC6rFlKw1aFG79wRv2rxPgl0pkLWX2b1F9e7MoMDPA4 +D9/xXzi4/azIdHNUgw1AoHvPRRKO7JSuj/uJ76tiJraxRqx5jU6Yk7XAv2Yccq6WqEPQ4Z2XO ZE0= Content-Type: multipart/mixed; boundary="------------45VvYFMWFSpp6pmKvm8UIUWc" Message-ID: Date: Fri, 14 Oct 2022 18:04:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Content-Language: en-GB To: "gcc-patches@gcc.gnu.org" , Jakub Jelinek From: Andrew Stubbs Subject: [PATCH] libgomp: fix hang on fatal error X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,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 List-Id: --------------45VvYFMWFSpp6pmKvm8UIUWc Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit This patch fixes a problem in which fatal errors inside mutex-locked regions (i.e. basically anything in the plugin) will cause it to hang up trying to take the lock to clean everything up. Using abort() instead of exit(1) bypasses the atexit handlers and solves the problem. OK for mainline? Andrew --------------45VvYFMWFSpp6pmKvm8UIUWc Content-Type: text/plain; charset="UTF-8"; name="221014-abort-libgomp.patch" Content-Disposition: attachment; filename="221014-abort-libgomp.patch" Content-Transfer-Encoding: base64 bGliZ29tcDogZml4IGhhbmcgb24gZmF0YWwgZXJyb3IKCkRvbid0IHRyeSB0byBjbGVhbiB1 cCBpZiBhIGZhdGFsIGVycm9yIG9jY3VycyBpbiBsaWJnb21wLiAgVHlwaWNhbGx5IHRoZQpj bGVhbnVwIGlzIG5vdCByZWVudHJhbnQgc28gd2UgZW5kIHVwIGh1bmcgb24gYSBsb2NrLgoK bGliZ29tcC9DaGFuZ2VMb2c6CgoJKiBlcnJvci5jIChnb21wX3ZmYXRhbCk6IFVzZSBhYm9y dCBpbnN0ZWFkIG9mIGV4aXQuCgpkaWZmIC0tZ2l0IGEvbGliZ29tcC9lcnJvci5jIGIvbGli Z29tcC9lcnJvci5jCmluZGV4IDUwZWQ4NWVlZGIxLi4yNTU0OGMxNGE4MiAxMDA2NDQKLS0t IGEvbGliZ29tcC9lcnJvci5jCisrKyBiL2xpYmdvbXAvZXJyb3IuYwpAQCAtNzcsNyArNzcs NyBAQCB2b2lkCiBnb21wX3ZmYXRhbCAoY29uc3QgY2hhciAqZm10LCB2YV9saXN0IGxpc3Qp CiB7CiAgIGdvbXBfdmVycm9yIChmbXQsIGxpc3QpOwotICBleGl0IChFWElUX0ZBSUxVUkUp OworICBhYm9ydCAoKTsKIH0KIAogdm9pZAo= --------------45VvYFMWFSpp6pmKvm8UIUWc--