From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.linux.lib.musl.general/22256 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: scandir qsort usage Date: Sat, 12 Jul 2025 10:50:02 -0400 Message-ID: <20250712144959.GD1827@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23780"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.9.5 (2018-04-13) To: musl@lists.openwall.com Original-X-From: musl-return-22276-gllmg-musl=m.gmane-mx.org@lists.openwall.com Sat Jul 12 16:50:22 2025 Return-path: Envelope-to: gllmg-musl@m.gmane-mx.org Original-Received: from second.openwall.net ([193.110.157.125]) by ciao.gmane.io with smtp (Exim 4.92) (envelope-from ) id 1uabYU-00067e-CG for gllmg-musl@m.gmane-mx.org; Sat, 12 Jul 2025 16:50:22 +0200 Original-Received: (qmail 16184 invoked by uid 550); 12 Jul 2025 14:50:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: x-ms-reactions: disallow Original-Received: (qmail 16130 invoked from network); 12 Jul 2025 14:50:12 -0000 Content-Disposition: inline Xref: news.gmane.io gmane.linux.lib.musl.general:22256 Archived-At: The scandir fixes thread prompted me to notice that scandir is invoking UB calling qsort with mismatched cmp function type. This was unavoidable without fully duplicating qsort code in the past, but now that we have qsort_r, it's fixable. If no one beats me to it I'll work on a patch to fix this too. Rich