Re: [PATCH v3] perf bench: Fix undefined behavior in cmpworker()

From: Namhyung Kim
Date: Mon Jan 20 2025 - 13:27:07 EST


On Thu, 16 Jan 2025 19:08:42 +0800, Kuan-Wei Chiu wrote:

> The comparison function cmpworker() violates the C standard's
> requirements for qsort() comparison functions, which mandate symmetry
> and transitivity:
>
> Symmetry: If x < y, then y > x.
> Transitivity: If x < y and y < z, then x < z.
>
> [...]

Applied to perf-tools-next, thanks!

Best regards,
Namhyung