integer overflow in std.sort.block
#18252
Labels
bug
Observed behavior contradicts documented or intended behavior
standard library
This issue involves writing Zig code for the standard library.
Zig Version
0.12.0-dev.1808+69195d0cd
Steps to Reproduce and Observed Behavior
repro:
block-sort-bug.zig.zip
Found in code using
std.sort.block
to sort a list of 1600 semver prerelease versions. To minify the repro, the order of true/false returned fromlessThan
is saved to an array and returned in the same order.original code and data:
https://github.com/oven-sh/bun/blob/800fb12906c4b9e485c6d5a6611c9e470a2183f4/src/install/npm.zig#L1660
gatsby-manifest.json
Expected Behavior
Block sort should not integer overflow.
sort.heap
,sort.insertion
, andsort.pdq
do not have any problems with the original list of semver versions or the order of true/false in the minified repro.The text was updated successfully, but these errors were encountered: