Skip to content

ccan: Update vendored ccan to commit fe99a8e0, which includes rustyrussell/ccan#129#9278

Open
nGoline wants to merge 1 commit into
ElementsProject:masterfrom
nGoline:update-ccan-asort
Open

ccan: Update vendored ccan to commit fe99a8e0, which includes rustyrussell/ccan#129#9278
nGoline wants to merge 1 commit into
ElementsProject:masterfrom
nGoline:update-ccan-asort

Conversation

@nGoline

@nGoline nGoline commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Updates the vendored ccan/ tree from efd48386 to fe99a8e0.

The headline change is rustyrussell/ccan#129, which replaces asort's old glibc-2004 quicksort fallback with glibc 2.43's stable mergesort (heapsort fallback). The old quicksort called cmp(pivot, pivot) when sorting all-equal arrays, violating the comparator contract that pointer identity implies distinct elements. Mergesort never self-compares, so it now matches qsort_r behaviour on platforms that lack it (e.g. macOS).

The resync also pulls in a cosmetic row-numbering reformat of base64.c (rustyrussell/ccan commit 11024115).

This unblocks #9153: once merged, the temporary self-comparison guard in cmp_rr_number() can be dropped.

Changelog-None

Includes rustyrussell/ccan#129, which replaces asort's old quicksort
fallback with glibc 2.43's mergesort+heapsort. The old fallback called
cmp(pivot, pivot) on all-equal arrays, violating the comparator contract
that pointer identity implies distinct elements. Mergesort never
self-compares, matching qsort_r behaviour on systems without it.

This unblocks removing the temporary self-comparison guard in
cmp_rr_number().

Changelog-None
@nGoline nGoline requested review from Lagrang3 and sangbida July 3, 2026 13:17
@nGoline nGoline added this to the v26.09 milestone Jul 3, 2026
@nGoline nGoline added the Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant