Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_CE65C392BE0D3B83C3F7A48DA41FEBCB8D05@qq.com>
Date: Fri, 10 Apr 2026 16:30:02 +0800
From: "Hankins" <546824250@...com>
To: "Luca Kellermann" <mailto.luca.kellermann@...il.com>
Cc: "musl" <musl@...ts.openwall.com>
Subject: Re: qsort core dump with 20,000,000 elements on 32-bit systems

Thank you for your patch. Your patch has successfully resolved my issue.


------------------ Original ------------------
From: Luca Kellermann <mailto.luca.kellermann@...il.com&gt;
Date: Fri,Apr 10,2026 11:18 AM
To: Hankins <546824250@...com&gt;
Cc: musl <musl@...ts.openwall.com&gt;
Subject: Re: [musl] qsort core dump with 20,000,000 elements on 32-bit systems



On&nbsp;Thu,&nbsp;Apr&nbsp;09,&nbsp;2026&nbsp;at&nbsp;03:21:49PM&nbsp;+0800,&nbsp;Hankins&nbsp;wrote:
&gt;&nbsp;Sorry,&nbsp;I&nbsp;should&nbsp;have&nbsp;described&nbsp;it&nbsp;in&nbsp;more&nbsp;detail.
&gt;&nbsp;I&nbsp;discovered&nbsp;the&nbsp;issue&nbsp;while&nbsp;testing&nbsp;on&nbsp;a&nbsp;32-bit&nbsp;system:&nbsp;when&nbsp;the
&gt;&nbsp;number&nbsp;of&nbsp;elements&nbsp;sorted&nbsp;by&nbsp;qsort&nbsp;exceeds&nbsp;18454930,&nbsp;a&nbsp;core&nbsp;dump
&gt;&nbsp;occurs;&nbsp;otherwise,&nbsp;it&nbsp;does&nbsp;not

I&nbsp;was&nbsp;trying&nbsp;to&nbsp;understand&nbsp;musl's&nbsp;qsort()&nbsp;a&nbsp;few&nbsp;weeks&nbsp;ago&nbsp;(by&nbsp;reading
Keith&nbsp;Schwarz's&nbsp;explanation&nbsp;[1]&nbsp;and&nbsp;Dijkstra's&nbsp;original&nbsp;paper&nbsp;[2])&nbsp;and
I&nbsp;found&nbsp;some&nbsp;bugs&nbsp;back&nbsp;then&nbsp;that&nbsp;might&nbsp;explain&nbsp;your&nbsp;issue.&nbsp;I&nbsp;just
haven't&nbsp;gotten&nbsp;around&nbsp;to&nbsp;reporting&nbsp;them&nbsp;yet&nbsp;but&nbsp;your&nbsp;mail&nbsp;encouraged
me&nbsp;to&nbsp;do&nbsp;that&nbsp;now&nbsp;:)

Description&nbsp;and&nbsp;fixes&nbsp;of&nbsp;two&nbsp;bugs&nbsp;attached.

Are&nbsp;your&nbsp;32-bit&nbsp;systems&nbsp;Arm&nbsp;or&nbsp;PowerPC&nbsp;by&nbsp;any&nbsp;chance?&nbsp;If&nbsp;so,&nbsp;see&nbsp;the
commit&nbsp;message&nbsp;of&nbsp;the&nbsp;first&nbsp;attached&nbsp;patch&nbsp;for&nbsp;where&nbsp;the&nbsp;number
18454930&nbsp;might&nbsp;come&nbsp;from.

Luca

[1]&nbsp;https://www.keithschwarz.com/smoothsort/
[2]&nbsp;https://www.cs.utexas.edu/~EWD/ewd07xx/EWD796a.PDF
Content of type "text/html" skipped

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.