From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ht1.ilikeinternet.nl (ht1.ilikeinternet.nl [46.17.1.212]) by sourceware.org (Postfix) with ESMTPS id 721A03858C2F for ; Sat, 2 Jul 2022 14:14:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 721A03858C2F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=Askesis.nl Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Askesis.nl Received: from [84.80.194.126] (helo=Obelix.Askesis.nl) by ht1.ilikeinternet.nl with esmtpsa (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (Exim 4.95) (envelope-from ) id 1o7dtd-00074X-HF for cygwin@cygwin.com; Sat, 02 Jul 2022 16:14:53 +0200 Received: from panoramix.askesis.nl ([172.31.1.1]) by Obelix.Askesis.nl with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o7dtb-0004sc-L6 for cygwin@cygwin.com; Sat, 02 Jul 2022 16:14:51 +0200 Message-ID: <426b02170703066d930c6f3a81f3ef9e686f69b6.camel@Askesis.nl> Subject: Re: Unexpected zero return code from `throw std::runtime_error` From: Joost Kraaijeveld To: cygwin@cygwin.com Date: Sat, 02 Jul 2022 16:14:51 +0200 In-Reply-To: <20220702132158.g6u7wo2lnokgezoc@lucy.dinwoodie.org> References: <20220702132158.g6u7wo2lnokgezoc@lucy.dinwoodie.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.2-1 MIME-Version: 1.0 X-Authenticated-Id: j.kraaijeveld@askesis.nl X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, 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 X-BeenThere: cygwin@cygwin.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: , X-List-Received-Date: Sat, 02 Jul 2022 14:14:59 -0000 Hi, The exception is not handled by the program. In that case "[[noreturn]] void std::terminate()" is called by the C++-runtime. std::terminate calls the currently installed std::terminate_handler. The default std::terminate_handler calls std::abort. After calling std::abort an implementation defined status is returned to the host environment that indicates unsuccessful execution. So basically both programs do the right thing. --=20 Groeten, Joost Kraaijeveld