bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crc-x86_64: undefined behaviour


From: Sam Russell
Subject: Re: crc-x86_64: undefined behaviour
Date: Sat, 18 Jan 2025 13:22:28 +0100

IIRC we test values from 0-16 bytes in the unit test and the pclmul implementation doesn't get hit for smaller values?

On Sat, Jan 18, 2025, 13:16 Simon Josefsson <simon@josefsson.org> wrote:
Thanks for discussion, Lasse.  I suppose the current situation is
difficult to change due to mainly licensing...

Lasse Collin <lasse.collin@tukaani.org> writes:

> I tested Gnulib's lib/crc-x86_64-pclmul.c (v1.0-1387-g5dd298feb0) a
> bit. I changed the target attribute to plain "pclmul" to make it work
> on a processor that lacks AVX. With 0-3 byte inputs the result differs
> from what I see from other implementations. I didn't investigate why it
> happens. I attached a test program that tests alignment variations but
> the problem can be seen without such a loop already.

Ouch.  Sam, can you reproduce this?  Maybe more test vectors would help,
to understand which result is the correct one.

/Simon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]