From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by sourceware.org (Postfix) with ESMTPS id 8D7DD385840B for ; Wed, 22 Dec 2021 15:46:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8D7DD385840B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-xf29.google.com with SMTP id ke6so2689974qvb.1 for ; Wed, 22 Dec 2021 07:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=3g7P5/fIdvS4ry8sN+OJr7o1V6EuDZeV0vBnXQrUChk=; b=pCgn4akj9snXsLOXXrbd8vJFhYIUa3ouw/VC8JMXF9E+q04RS0C8oTF9JBR0nZPAXZ n3daEpw5slHjUEQAnyU/StGF7rVodGJSN+cfWdpBGaX5HF/hvbQuxnwqhOVjONYMa8Lj z9blf8q2Sv76ymGJ0G34CTqnNUJ5dCq1CzQWrs/ibwFJ/CHQyWmETevqnoyaUuLWMQU3 GsiWoy3Hwo8hk56c6GyKum93VREwLzo2qXv9g7phgVkjr+6UzZ3pBVhwXCKR+Twq91NJ RK30GnfDUqa1tZEh3HU1+4uAPe6yfHG3Xo8xtuOiSttUJ2n0s3F66++OlcJyO5yAKetD KCFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=3g7P5/fIdvS4ry8sN+OJr7o1V6EuDZeV0vBnXQrUChk=; b=pbONw6VMTFAjG6LXQYcskZilxuAWEulJG9F3uvKud+QehTglw1GkJn8ikUx/xNHN3S KVSkaSqI5KE7aWKZKLDwBqUxrpNZHoy5wcQyHV93lw9EhJyBzn48b615kSRS/R+lgDgo xzoxrFSUZiTcsWsiZBIzTKSWlFIvfPftqCARkUBZHClCQ3DihM/BVP7rbD3q/Tzo0rzG ui0ShTFjRAumcUN+67TxvSyhC/ESAzu3rSb5Z6j9CxRR3rkCvhesMs2nElZmJMXGqEVb FjTXB3ZHSEsIbjWt6aTL50mbwUmxLHl4DyZpcW3ZLujQ0qDMfgT/ShvJO/izDR9nAUZc O4dQ== X-Gm-Message-State: AOAM532u7uf8YlaniS3Px82RBNhR2eNG4ZyY2ueS44pHNuEFHs087LwM SaJWfqqfUZirEMGk8EJqNyCGUFHYPKI= X-Google-Smtp-Source: ABdhPJzUvpr6l0USggBXcJn/RROriUrvDU8koKhGVZtfC0vTIyMp67mjEU74+OZfdwrgy8V6uAQRLw== X-Received: by 2002:a05:6214:2626:: with SMTP id gv6mr2937048qvb.29.1640187962932; Wed, 22 Dec 2021 07:46:02 -0800 (PST) Received: from davidm-laptop (hlfxns018gw-134-41-172-106.dhcp-dynamic.fibreop.ns.bellaliant.net. [134.41.172.106]) by smtp.gmail.com with ESMTPSA id u16sm1948557qke.127.2021.12.22.07.46.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 07:46:02 -0800 (PST) From: David McFarland To: cygwin-developers@cygwin.com Subject: Re: Fibers and cygtls References: Date: Wed, 22 Dec 2021 11:46:01 -0400 In-Reply-To: (David McFarland's message of "Mon, 20 Dec 2021 11:01:36 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (cygwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2021 15:46:05 -0000 David McFarland writes: > This seems to match what I'm seeing. The boost unit tests fail with > ucontext, seemingly because the exception handlers are wrong after > switching contexts. They pass using fcontext, but only if I apply the > TLS patches I shared here: > > https://cygwin.com/pipermail/cygwin-developers/2020-September/011970.html ucontext appears to have the opposite problem as the other fiber implementations (boost fcontext, windows fibers). The TIB StackBase and StackLimit are never changed, so cygtls is still accessible, but windows stuff (including exception handling on x64?) is broken. It's possible it could be fixed by storing cygtls in windows TLS, and setting StackBase/Limit in setcontext.