X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A06E0385EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1597584093; bh=DywSXiIc5riFE/CETiOBHjeprch2ebLtHj1tFcCDm8Q=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=HCl5scqhS7OBKRhKxoBpiz22mXl6FSGnn1C2USAuo8tv8u2+3WuQz9iJyu/Mn4XJ9 3zX5vg+BBc8x/B5C4jbOrHTA3RwP89nXdujHvhzdaf2uHU3aLS36c4ab6sOJPLTTJ7 u+bFzRFOY3t26hGysHlVDLqILIQfhpO8BeFCqfGM= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 66CA53857C4A ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CDobTctYp4F4M43gQNpBubSe7WAoctcYCGHyqsc2N86tjOhi8WEp069GkJeSXFdxS8vhMzBZEW+zCiSP//cjUBgvKQLKyQ96po59Tte2CYQorx7YO201LrP9SagZZZ4eSzsL52YGyge3jacrGfBf2INamUUWiCLtvJylkqy99ZFCauvo1us9scRN5vaKEkZUoT2I6Q1SrG7j7ncsMee0JmFbkqzoEwWGretF4LD3/KthUhjKSd/Qc42GdPGtAJ11HriidyOB/DLVCazuvyXNpSU7bftPDtyojhFM5jhpZ7cEGyZN1ACvkWhzk0wIn3h83NrhLAKe0jWSlEK096GpNg== 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-SenderADCheck; bh=qCeaZ8TuqGsAwLmb5aadbNRCmOY4qMdH0LHGXjPMF9Y=; b=Wjiz+yOkisIsH0UY4ly2koi80Bs0fIQyfu8kjJBzlS41AEpgJlLhXzc7VWIh+FyWdRkWWOybkDl8VIamIxChfrx6rnroBHxTnm6AWxCCAqkz/KlB8vkGAPxryDO+8Slccm9MZQJGJiETfk98QeJQCzEvsFD3AKRq9QkuJrxxZ0HawIB7WBBTITfwPFi4fxjuldBOhlHl1b8IV+PxPEo7YMEBWnLQxa8Yo1ZjeL4K+fnOw76a/r31HEaPl1TLj84JkJnZG4YJveeDjYL19TnEYH8JUQaiDd6c4p+7pDk3ywE8H/C8i2QzZjRqtB3df4ku6b7tJKCH2waYmvtJ+kir0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none Subject: Re: unhandled C++ exceptions not propagating To: cygwin AT cygwin DOT com References: <20200816125306 DOT 60dc246baf63d7f9fba60611 AT nifty DOT ne DOT jp> Message-ID: <6c27d8d6-876a-6c09-bccd-a9123400cfdb@cornell.edu> Date: Sun, 16 Aug 2020 09:21:24 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 In-Reply-To: <20200816125306.60dc246baf63d7f9fba60611@nifty.ne.jp> Content-Language: en-US X-ClientProxiedBy: CH2PR16CA0012.namprd16.prod.outlook.com (2603:10b6:610:50::22) To MN2PR04MB6176.namprd04.prod.outlook.com (2603:10b6:208:e3::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.17] (68.175.129.7) by CH2PR16CA0012.namprd16.prod.outlook.com (2603:10b6:610:50::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15 via Frontend Transport; Sun, 16 Aug 2020 13:21:26 +0000 X-Originating-IP: [68.175.129.7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f3d68050-7372-4452-f0d5-08d841e747d1 X-MS-TrafficTypeDiagnostic: MN2PR04MB5599: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZkEsCs0gYx4nXxEp9qRBKE8fT1Ic/mHAU34o9Um4H8puTTbX83tf+0zi28cB1EduUUB0L1MHPb3aPrUKWftBcNcH0xwN1t3twO4q9G0cQ3KTm1hnWUyowb+6A2A6wDOym19NHwJduaX5m9WV2B0lr4riWg2aYPbjH8LeE+4mbkXx1YCw8Gjo1X0zH9zGuvEadkwy/UtFNBowZPEHThagbCUQJfE5fw+VUN9U3JWkV6h4aOWorqZOyL+ubJxU63LmRwP/nO+bt0QxPDCaDIZZKG+ObOOXVnUK6bg9nY+RIdHVnfS+JECxR2Q/hUAguECWe+hUpE3Uiz0m00tbiU+2XaKyy4AVkY6h86Qw9v2tTdytr40kSLaYAmR37LjHeCyhSjd15rOCwoz+ZsPOJX5qg3dSIs5CAmZKwMDxbt80umPcGOps/XTU9QhbzF0GjJW1805bTfKEx5eUW+Lser4Hgw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR04MB6176.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(376002)(396003)(366004)(136003)(53546011)(956004)(86362001)(31696002)(36756003)(2616005)(16526019)(5660300002)(83380400001)(6916009)(186003)(31686004)(2906002)(75432002)(6486002)(478600001)(786003)(52116002)(966005)(26005)(66476007)(66556008)(316002)(16576012)(66946007)(8676002)(19627235002)(8936002)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: eHHSPwZXybk6BYKR/s9uVJYidfc9N5ACcGPILc6fyI8lvhaQv9Sws9uIJjHqQhKfA9k0DfbTXLwbxtTSlKzw8Z9Dc/MA1iOfTS7MjGQjw4v6TlVWD/4N2MYKLpFmE3K1gpnUpOct+8VkY1zHbzEbEYI32NEkQre5w3Gx4Y1JH5BPmvg2qkhtzVcS1Xzte059YgELP/dEUr8WHZbgRdOWv3Jyuvps5s+X1gA3kSn9RjThbUNjpvPm4d4DZrb2jAPdrIbS4F5Hoc80VydVksBhQVIyM3rrOa6NvryXYE+tGA41wdMeZFW3sAKfMNZHEn9Sj6GgXVnniTRkpcXLcHOxr/6IyzxWTMHd7hddnkevjl1AK3hTT8UMxG/acSZPR/s2Q5HfJHC5jLQB7zAHyqlahPZWdwaMlVDdINzm9NWoV3cIyyvG3bfyqAkWTGr2jLhj2oj/bdnBAW0Jvwz056Zcmz3E4MWLAwxuHcgEx10DRK7VCX59n6f0THr4CT7RqJetzUoIwYOxkwN9Jogwq6+2uoEvwWxtyILvwLHdN5KysymP3NeXKgxAm0Y4MQws+YmzDwTAK4iOpwjNoLOYdWs+HbK9lwwAJHjb2Slxz+GkCzfRHaFr/jG7X46+4crtms+ygGGiEQ/bX4tsthm9N5h3Tw== X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: f3d68050-7372-4452-f0d5-08d841e747d1 X-MS-Exchange-CrossTenant-AuthSource: MN2PR04MB6176.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2020 13:21:27.3015 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HmR9iU2fRJ3Eom56RCiMoSXxy/QrZP7X5P4QrfdeBUt0dD6jljhkZ1qOEuAt0xCLSrfCoBUtU3Fp7qxGNMToEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5599 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Ken Brown via Cygwin Reply-To: Ken Brown Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" On 8/15/2020 11:53 PM, Takashi Yano via Cygwin wrote: > On Sat, 15 Aug 2020 20:38:01 -0300 > David McFarland via Cygwin wrote: >> >> I was just debugging a c++ app (b2 build system from boost), and noticed >> that it would appear to exit unexpectedly without an error. This turned >> out to be when an unhandled C++ exception was thrown. >> >> On a fresh install of cygwin with gcc-g++, this program will throw an >> exception from the std::string constructor: >> >> c++ -x c++ - <> #include >> int main() { std::string str(nullptr); return 0; } >> END >> >> When it's executed from the shell it returns zero, but execution stops >> at the exception. >> >> $ ./a; echo $? >> 0 >> >> When executed under gdb, the exception is caught, and the process exits >> non-zero when continued: >> >> (gdb) r >> Starting program: /home/corngood/a >> [New Thread 4300.0x1390] >> [New Thread 4300.0x1d24] >> [New Thread 4300.0x1d48] >> [New Thread 4300.0x80c] >> gdb: unknown target exception 0x20474343 at 0x7ff8d2cfa799 >> Thread 1 "a" received signal ?, Unknown signal. >> 0x00007ff8d2cfa799 in RaiseException () from /cygdrive/c/WINDOWS/System32/KERNELBASE.dll >> (gdb) c >> Continuing. >> [Thread 4300.0x1d24 exited with code 541541187] >> [Thread 4300.0x1870 exited with code 541541187] >> [Thread 4300.0x1d48 exited with code 541541187] >> [Thread 4300.0x1390 exited with code 541541187] >> [Inferior 1 (process 4300) exited with code 04021641503] >> (gdb) >> >> When executed under strace, it exits with an error as expected: >> >> $ strace -o /dev/null a; echo $? >> 67 >> >> That's as far as I've investigated so far. > > Is this the same issue with > https://cygwin.com/pipermail/cygwin/2019-October/242795.html ? > > As far as I tested, this does not occur in 32-bit cygwin. This doesn't seem to be a new issue. I found the following report from 6 years ago, on Cygwin 1.7.30 with GCC 4.9.0: https://stackoverflow.com/questions/24402412/program-executed-on-cygwin-does-not-report-a-thrown-exception Ken -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple