Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sun, 6 Dec 2020 18:32:34 +0100
From: Szabolcs Nagy <>
To: Rich Felker <>
Cc: Ariadne Conill <>,,
	Drew DeVault <>
Subject: Re: [PATCH v2] riscv64: correct struct __ucontext name

* Rich Felker <> [2020-12-06 12:19:30 -0500]:
> On Sun, Dec 06, 2020 at 05:10:25PM +0000, Ariadne Conill wrote:
> > Bummer.  In that case, I suggest musl use the same struct tag consistently. It 
> > should probably be struct ucontext_t for consistency with glibc.
> I don't recall the original reason it was inconsitent with glibc here.

glibc changed the declaration 3 years ago (breaking c++ abi)
before that it was not posix conform so musl could not be
consistent with it.

see "Rename struct ucontext tag" in

> Note that signal.h has (which is probably wrong and should be
> removed):
> #ifdef _GNU_SOURCE
> #define __ucontext ucontext
> #endif
> so that the tag gets renamed if _GNU_SOURCE is defined. Maybe at one
> point glibc called it "struct ucontext", which was a namespace
> violation since it's not in a reserved namespace, and we used
> __ucontext to get the freedom to rename it and expose that only in a
> _GNU_SOURCE context.
> Whatever the reason, though, the struct tags is C++ABI and should not
> be changed. The rv64 inconsitency was unintentional and hopefully is
> not yet widely used enough for anyone to care that it's being fixed
> now (in theory could mess up linking C++ libs with ucontext_t in their
> public interface surface).
> Note that none of this is visible to applications that aren't doing
> anything horribly wrong. Neither "struct ucontext_t" nor "struct
> __ucontext" (nor "struct ucontext", which it looks like we were
> wrongly trying to support) is API.
> Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.