public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: David McFarland <corngood@gmail.com>
To: cygwin-developers@cygwin.com
Subject: Re: Fibers and cygtls
Date: Wed, 22 Dec 2021 11:46:01 -0400	[thread overview]
Message-ID: <vritmtksy75y.fsf@gmail.com> (raw)
In-Reply-To: <vritczlrz5f3.fsf@gmail.com> (David McFarland's message of "Mon,  20 Dec 2021 11:01:36 -0400")

David McFarland <corngood@gmail.com> 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.

  reply	other threads:[~2021-12-22 15:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 15:13 David McFarland
2020-09-04 19:51 ` Corinna Vinschen
2020-09-05  2:46   ` David McFarland
2021-12-20 15:01     ` David McFarland
2021-12-22 15:46       ` David McFarland [this message]
2020-09-06 14:19 ` Jon Turney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vritmtksy75y.fsf@gmail.com \
    --to=corngood@gmail.com \
    --cc=cygwin-developers@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).