aboutsummaryrefslogtreecommitdiff
path: root/lib/std/sort/pdq.zig
AgeCommit message (Collapse)Author
2025-09-17std.sort.pdq: fix out-of-bounds access in partialInsertionSort (#25253)Frank Denis
* std.sort.pdq: fix out-of-bounds access in partialInsertionSort When sorting a sub-range that doesn't start at index 0, the partialInsertionSort function could access indices below the range start. The loop condition `while (j >= 1)` didn't respect the arbitrary range boundaries [a, b). This changes the condition to `while (j > a)` to ensure indices never go below the range start, fixing the issue where pdqContext would access out-of-bounds indices. Fixes #25250
2024-08-27compiler,lib,test,langref: migrate `@setCold` to `@branchHint`mlugg
2024-07-09std: fix typos (#20560)Jora Troosh
2023-11-19lib: correct unnecessary uses of 'var'mlugg
2023-06-27improve documentation of std.sort.*Context functions (#16145)yujiri8
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-13Fix pdqSort+heapSort for ranges besides 0..len (#15982)Niles Salter
2023-05-23std.sort: add pdqsort and heapsortAli Chraghi