Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ffe2f454-992b-4dd4-822f-e91edbd934c1@gmail.com>
Date: Tue, 20 Jan 2026 19:56:05 -0500
From: Demi Marie Obenour <demiobenour@...il.com>
To: musl@...ts.openwall.com, Rich Felker <dalias@...c.org>,
 Xan Phung <xan.phung@...il.com>
Subject: Re: [PATCH v1] wctype: reduce text size of iswalpha & iswpunct
 by 53%

On 1/20/26 10:09, Rich Felker wrote:
> On Tue, Jan 20, 2026 at 01:35:26AM +1100, Xan Phung wrote:

(snip)

>> +
>> +int iswalpha(wint_t wc) {
>> +	unsigned *huffm = (unsigned *)(table + PAGEH), target;
> 
> The aliasing violation here isn't acceptable. Is there any good way to
> avoid it? I've only skimmed this submission so far; I assume the
> motivation is doing the popcount across 4 bytes, but I don't yet
> understand why popcount was chosen as the way of storing an index.

Do compilers optimize using memcpy() for type-punning?
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)
Download attachment "OpenPGP_0xB288B55FFF9C22C1.asc" of type "application/pgp-keys" (7141 bytes)

Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (834 bytes)

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.