animetosho / rapidyenc

SIMD accelerated yEnc en/decode C library
5 stars 0 forks source link

linux/arm64 decode failure #2

Closed mnightingale closed 10 months ago

mnightingale commented 10 months ago

I think there might be a bug with decoding on linux/arm64. I'm testing on a raspberry pi 4.

In my Go module I have a test which just throws random data at encode followed by decode and I'm seeing failures fairly regularly.

I've tried compiling with GCC 13.2.0 and GCC 11.4.0. I don't see the same failure on macOS arm, Windows x64 or Linux x64.

Below files are available from rapidyenc-arm-issue.zip

These are reproducible steps which are just using the rapidyenc_cli tool to rule out any of my own Go issues.

$ echo -e -n '\xB5\x3F\xE1\x20\xD1\x54\xA3\x5F\xC3\x2A\xFF\xF3\x25\x79\x45\x41\x3C\x55\xB8\x65\x8E\x31\x93\x06\xF5\x3C\x00\xC5\xF1\xB8\xD4\xC3\xC0\x7E\x64\xC4\x91\x84\x48\xF6\x38\xE2\x58\x94\x3E\xF4\x5F\xE9\xC4\x85\x03\x5F\xA8\x24\x92\xF5\x4F\x7E\x80\x62\xEB\x9D\xEC\xEA\x49\x49\xE5\x9A\x04\xC0\xDA\x7F\x7C\x9E\xF1\x3E\x62\x14\xA6\x40\xC6\x5C\xBE\xA9\xFE\x47\xF5\xAB\x3F\x5A\x0A\x9C\x1D\xCA\x61\x99\x2B\x8A\xAC\xA1\x20\x73\xDD\x4D\x36\x2F\x9F\xBE\x4E\x1A\xCC\x32\xB3\x9B\x86\xB8\x62\x39\xE6\x45\x38\x1C\x43\x04\xFE\x91\x56\x5C' > raw.dat
$ ./rapidyenc/build/rapidyenc_cli e < raw.dat > raw.yenc
Computed CRC32: b1c30d10
$ ./rapidyenc/build/rapidyenc_cli d < raw.yenc > decoded.dat
End of input reached
Computed CRC32: 90d9ecb8
animetosho commented 10 months ago

It worked with GCC 10... 😧
Anyway, thanks for the report!

mnightingale commented 10 months ago

Awesome, it passes my tests now, thanks. I'll pin by build step to 13 to stop it breaking.