[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] Port unwind protection to C23

From: Paul Eggert
Subject: Re: [PATCH 3/4] Port unwind protection to C23
Date: Mon, 27 Mar 2023 01:35:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 2023-03-26 21:17, Martin D Kealey wrote:
While C has never guaranteed that pointers all have the same size &
alignment, POSIX does provide this guarantee, although indirectly (it has
to be true for dlsym() to work, for example).

My commit message was a bit misleading, as the problem is not limited to platforms where pointers can differ in size or representation. The problem can also occur on platforms where calling conventions differ depending on type even if the two types have the same representation, and this can (and has) occurred on platforms with linear address spaces.

The patch fixes an actual (albeit unlikely) bug on GNU/Linux x86-64, due to a variant of that sort of thing.

I'm all for tidying up the code so that it can compile
cleanly and run reliably.

Yes, it's a win overall.

The patch is not enough to make Bash entirely C23-safe, alas; more work needs to be done in this area. Unfortunately it's a bit of a pain due to the K&R cruft still present (which can fight with C23).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]