From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C1C4383B413; Fri, 11 Jun 2021 10:33:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C1C4383B413 From: "l.v.merzljak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100897] Symmetric transfer does not prevent stack-overflow for C++20 coroutines Date: Fri, 11 Jun 2021 10:33:53 +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: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: l.v.merzljak 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 10:33:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100897 --- Comment #2 from Leonard von Merzljak --- (In reply to Iain Sandoe from comment #1) > for symmetric transfer to work without stack overflow, it relies on an > indirect tailcall. >=20 > For some GCC targets indirect tail-calls are not available without some > additional support (see PR94794). >=20 > I tried to reproduce this (with a test case I use regularly for this) on a > target that normally completes symmetric transfers successfully when the > optimisation level is > 1. (x86_64, darwin). >=20 > The fail also occurs with my regular test case with -fsanitize=3Daddress = - so, > it seems that the inclusion of the address sanitiser is preventing or > interfering with the tailcall. Note that there are also other known issu= es > with coroutines and the sanitizers (PR95137). Thank you for your comment. I tried it out and can confirm that I don't get= a stack-overflow anymore if I omit -fsanitize=3Daddress and use an optimizati= on level > 1. If the issues with coroutines and sanitizers are already known, = then this bug report can be marked as resolved. Of course, it would be nice if the stack-overflow would not occur even when using an optimization level <=3D 1, but this probably does not qualify as a= bug.=