Skip to content

fix is_sorted check failing for large multiplier values#6560

Merged
a10y merged 3 commits intodevelopfrom
aduffy/fix-sorted-seq
Feb 17, 2026
Merged

fix is_sorted check failing for large multiplier values#6560
a10y merged 3 commits intodevelopfrom
aduffy/fix-sorted-seq

Conversation

@a10y
Copy link
Contributor

@a10y a10y commented Feb 17, 2026

Fix for the issue found by fuzzer in latest run

image

Seems like this snuck in on #6452

@a10y a10y force-pushed the aduffy/fix-sorted-seq branch from 2ccb6ce to 42dca6b Compare February 17, 2026 15:32
@a10y a10y force-pushed the aduffy/fix-sorted-seq branch from 42dca6b to 1b3239f Compare February 17, 2026 15:33
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y force-pushed the aduffy/fix-sorted-seq branch from 1b3239f to ebb60de Compare February 17, 2026 15:34
multiplier,
uint: |v| { (true, v> 0) },
int: |v| { (v >= 0, v > 0) },
float: |v| { (!v.is_sign_negative(), v.is_sign_positive()) }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably shouldn't even allow SequenceArray of floats should we

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really thought it was banned in the ctor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it is. should i just put unreachable!() here then?

@a10y a10y added the changelog/fix A bug fix label Feb 17, 2026
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, IIRC @joseph-isaacs and I went with cast instead of the macro because a macro is more expensive (to compile?). But if that's causing correctness problems, then the macro it is

can't tell about the sequence array of floats

@joseph-isaacs
Copy link
Contributor

I would just use a i128 cast?

@a10y
Copy link
Contributor Author

a10y commented Feb 17, 2026

i don't think the macro is more expensive, the cast pathway also expands the enum variants so I think it shakes out to the same thing?

Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y force-pushed the aduffy/fix-sorted-seq branch from 99ba82a to ac5d5d6 Compare February 17, 2026 16:31
@a10y a10y enabled auto-merge (squash) February 17, 2026 16:31
@a10y a10y merged commit 99fe69e into develop Feb 17, 2026
48 checks passed
@a10y a10y deleted the aduffy/fix-sorted-seq branch February 17, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants