From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DD7B93858C74; Wed, 21 Sep 2022 00:33:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD7B93858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663720426; bh=K8jbOdM1fDfECyJ9CDZpYEjlic8Q2HfGtCFoeREW9Ig=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RmSRQ/dqyJkqDMNOXgQKRQ6LorYIcJ8t8AP4UiK6O3yj4cbqi55x1T7+QZWy2EhVc ysSb2UA7JpDWyYzfMYZ3rCju6VsDO8BWcpxcGH6gdokH5tZL3Oap+3Ir1uQ0Bn53GI IJ4uFuFaXDpafOHmn7Qt6wLlPysGUUrbzL26kQ4M= From: "woohp135 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106973] coroutine generator and setjmp Date: Wed, 21 Sep 2022 00:33:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: C++-Coroutine X-Bugzilla-Severity: normal X-Bugzilla-Who: woohp135 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106973 --- Comment #7 from Hui Peng Hu --- I was trying to call libjpeg to decode images inside a generator. A snippet= of code that I found online used setjmp/longjmp for error handling, hence I ran into this issue. Given that the longjmp is called while the coroutine is executing, I'd imagine that the behavior is fairly well-defined. I've since moved on to using regular c++ exceptions for error handling, and so this is= sue isn't affecting me anymore, but I thought it'll still be nice to get it fix= ed (or at least print a helpful warning/error message) so that gcc is not segfaulting=