X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 113A0385E020 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1597548354; bh=vVkFPOphsxnrOxA6BwFD3QEwxUeFNTjIP6Ft+ECt5jw=; 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=P+641P9SYkRQ//RsrHwob5aY2Aag4d1Il+urs9su9ss6P3kRtl0ub0HZYK9xRe74I nmm1MINXMUggzDkCIVBaZwVtuR8ogX4iuP1FZNIHLcSdn3lveQNHu++/9XfxmHAFTQ gytdagnSiZasZC8Ec7qV0GAwz/pUeFypB4CgF6S0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4E9EF3857036 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:autocrypt:message-id :date:user-agent:mime-version:in-reply-to; bh=3wh9KuWDIVEBB21sJ6mADFmllyGdtxWApSSzfU2zBgQ=; b=h5RBsnPbw99SyvM3BVxW4dmHtV+ywj35HkzzBRqnyRY3lihYHprzu6aZD4S//gCSFT RNxVRN4R24/Q1Q6wcNjOYp8oClHVN9r40D2DeXd9AcD45Wu4K0RKudATGaTDArCo80B4 KzhSFjcauzARiD2AcNPVbc16BXYLxacBz2Lj7Wig7V/tIfDQ3Mel3+NtynfshJEFFThV 9Fy3zyFpFJumowep9MkMDFB0OiP4x8KevUCqez2N6zsLw/6q2kDI4mj1hvBzZ904sWUa RYxCCN5hZFZ9NQrBPHApaUcYba/fhegNCKwgr6GogJDurPXKvh67c1YRGsXkiJJU3j1E FsFA== X-Gm-Message-State: AOAM531bYuAF2V3HTDarieKeTHDkrMODJgmHCndjhGdhE823UTmrWFoh kkXCJZkFED0z7MwBrOTSf8HMlhTCTfo= X-Google-Smtp-Source: ABdhPJyvq1EBiFHr0EACNrXGN4mcM5e5X9+asKJ00GVRcCGfG83xlldkcpprv6QAd9VK3akx8HmxjQ== X-Received: by 2002:a17:90a:cc14:: with SMTP id b20mr7474237pju.1.1597548350031; Sat, 15 Aug 2020 20:25:50 -0700 (PDT) Subject: Re: unhandled C++ exceptions not propagating To: cygwin AT cygwin DOT com References: Autocrypt: addr=10walls AT gmail DOT com; prefer-encrypt=mutual; keydata= mQINBFDEdwIBEACSrmywJMpgYlgJa0HJ1AFu9tQp8yVpVS21EfnrSK16TS6PoW/JS78D5CYx pshPzr1iil8yeL8/val1yXkI8uNZjMnhLxMBU5C7WEMCeY/h760btG3bZZ5BMCNCkC0Yfrtv JJQDEyv1H+p1U7yMFRyxNtMjaf6QDzoRjTVOzO6mtNMZWYnlhzC54etiVt3HQ4jKOlKbI+dw jigIw8B1SZ+xWcukAHRMBcIZYLjbnAI/XNu796pfwh6QEhJjr8EpvyNjdHLFSMMuyUPO/a3s r/jkFSTpqt5lr9jWejdQwe7e8WtbC+euv++fH1B9Yz42259kLxgH+aHk6lWX3epIIx3w17rG faMrFrINjXEBGLLOQkIy2LtBLYRU2NhDg+VSDOEwAsiOVZs1EHpSNF5GV12L8SFiNtVToHxL RpObNpYIHBkDFzx9gvQfX5Kocx5XFhBiNfTjdxBOjopLzQHpfCSo3fzSqc7zpscqOw3uni7G IN86fI8h3wSV44dQ4yaervnL2kZykRyWL5y1C9WDfjzljTIeLB6gK/gBbrsuKuVC42r6xAK9 yC9pL0Trf7+GLJ9UF4WGnJ5IvfVpZ7gtBMjWOpiwewTprdBNwhLsVSep9Vqg/cbtmG6AnpzN tMsLEWAwDpgaFa5KqlehgUCuMlEdU6LhvSd0cJ/pqKwwzxEiLwARAQABtBlqb25feSA8MTB3 YWxsc0BnbWFpbC5jb20+iQJVBBMBAgA/AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgBYh BOUK3Z2w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qv8lELvz9TJ2 Kh5urXJ/7LOvof9z3R0g7Hn7AWn1Y+0hUKN1vRqziJdIFqZ7kcViiKYAKfYiDPlHSAVguc3q vok0P8A3uS5qvkz2yC3C5Jt913FoNVu3ny0/UCDjpSAqC3qTXMx3otwLDLv/dwARAQABiQI8 BBgBAgAmAhsMFiEE5QrdnbBX9Ppk4bbPcTtf4pwUXUUFAlv+TloFCRSf2NgACgkQcTtf4pwU XUWzcw//ckxWc2Zyd58jjZxpMG1hpGHJVMyi+1aC12mCozlKuGDUBhbEbs6z8INlAQh9ic5d h9jXW8WclJglzo1Bm1naQOUmCFLh2WgV/0Om9vqDeJ0r5J2xcoBesiAflt/2dBHn3sZHivwq 46c2/pMl95LAoA9z+4lZLBCjL64wo9QZujrDoSlUTKMnmfTKYzvUqF4Y7394b3cwi4WNlR3C eqAzU5f+RjGlIpCTP2h+ui7L8JvPCBLzy6lcEm6NJayUIMDyFKYtlJdiPOVtSveZyrFjx6qW rIHogOXTorTZrtysBi8gAoU+7h7dOBswi0vnjftyH7S6M8N0K+LKnRj8zBjajyAcBRuvXP+t fvIPHUMnkWifgMLhrMUgTZHX4V4DVjNHzVuAxr+yIHGLUgn6sSrYnYX8aCK37cByLO78563L aT/p7WD56R5grBe0HEaoarixVmovv4GzI3GGNLBx+GraRAtvbPsol0sZ0OZWKWVL1/meHi7F e5EFYeoI5/xANT1Xm+GMnLGrt6CH44FaJ0rUQ900ZGf69laS+pniyasFgdtiUeCLCcUww9k6 jUq5Sa1npJYFVJqnuush2cUXWG5Z9DFZ2Jg7LWvZqUc2rt0B8+AIWWfEGNoh3KgziYAnpr+5 iH7wMIsgvMwRrJmB2S4ixQUNVeE06B+VUDKv1BkfmRE= Message-ID: <85e96870-818a-78a5-e78a-d1cfa48772ee@gmail.com> Date: Sun, 16 Aug 2020 03:25:43 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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: 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: JonY via Cygwin Reply-To: JonY <10walls AT gmail DOT com> Content-Type: multipart/mixed; boundary="===============4012229390627030667==" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============4012229390627030667== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Nxq7KBA4JVma92fjvBhseFIwfT9ZSp6gu" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Nxq7KBA4JVma92fjvBhseFIwfT9ZSp6gu Content-Type: multipart/mixed; boundary="30N4yKzK3Hjvox5Reaii2SPeQAzHqjnAR"; protected-headers="v1" From: JonY <10walls AT gmail DOT com> To: cygwin AT cygwin DOT com Message-ID: <85e96870-818a-78a5-e78a-d1cfa48772ee AT gmail DOT com> Subject: Re: unhandled C++ exceptions not propagating References: In-Reply-To: --30N4yKzK3Hjvox5Reaii2SPeQAzHqjnAR Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 8/15/20 11:38 PM, David McFarland via Cygwin wrote: >=20 > I was just debugging a c++ app (b2 build system from boost), and notice= d > that it would appear to exit unexpectedly without an error. This turne= d > out to be when an unhandled C++ exception was thrown. >=20 > On a fresh install of cygwin with gcc-g++, this program will throw an > exception from the std::string constructor: >=20 > c++ -x c++ - < #include > int main() { std::string str(nullptr); return 0; } > END >=20 > When it's executed from the shell it returns zero, but execution stops > at the exception. >=20 > $ ./a; echo $? > 0 >=20 > When executed under gdb, the exception is caught, and the process exits= > non-zero when continued: >=20 > (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/System= 32/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) >=20 > When executed under strace, it exits with an error as expected: >=20 > $ strace -o /dev/null a; echo $? > 67 >=20 > That's as far as I've investigated so far. Can you try if different (older) GCC versions exhibit the same problem? You'll need to recompile your example with said version as well. --30N4yKzK3Hjvox5Reaii2SPeQAzHqjnAR-- --Nxq7KBA4JVma92fjvBhseFIwfT9ZSp6gu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5QrdnbBX9Ppk4bbPcTtf4pwUXUUFAl84pzcACgkQcTtf4pwU XUUQLg//cB04rkVZIF5mu7kpfPdE5ASnk08+ktSCte22XLLAKlaSarG/4S+KTj2O AUf7ggsI0bKk0jXiTR173Jtt4DJdJpwtZwbuoz23Srl3ENiapbKbM9bw2iESEa8U EWi4dKO6EI+fAK1sbbl0Hxljiuw2chMJaZmjANZQxIRCdoCniMRapiyBRrpVVKRT zF3HLuFANpcoUSGlSnBUaUmHx/GiopGYTMZk1FHTWuUERVmqxzvCN/RboY4AR5ZD UNS7+2L9g/lC9QImiYvopi+rOZl9/id28zUrwq/GX4o0IgKec0aaZiitci75KpTC OB+ooMEXBZQ7x1tANimHgmy8ncVGVsy+SwH8Dq5HT/5Lze2nYZv0sM9coa6WgQ2y qNB+sCp3QfJl02bGCcVuQEUP4vcV/eLdkUuAiOw66tavex5nK1Tg3BmKOFpcsF08 ZD8Sk96fRwGhilXFm3As3v3TvYrs/57RiMgq0iRtpF1Z0HHmjPTjTFnhvSnVHB1Y uW5s8GSG0rzhv/PRT055a1OoY2EHxnjhFqZfUoAsAHjwqxvBAdzT6hI4ELKPKMqK J2mR1T7mZgYuDtq+AJQdgKxK7x732het6TmEMMaztRfW87af2Dc9sKy+cukTKcvJ 32YEqZArijJOinrdLT53Nh5IJual9WLi5xYYTJ28fyQ5jQ0wo4A= =mxDO -----END PGP SIGNATURE----- --Nxq7KBA4JVma92fjvBhseFIwfT9ZSp6gu-- --===============4012229390627030667== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- 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 --===============4012229390627030667==--