klauspost / reedsolomon

Reed-Solomon Erasure Coding in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

panic with err “unreachable” when compile on i386 architecture,but on amd64 notfound this panic

IoTServ opened this issue · comments

panic("unreachable")

only on i386 plateform

only linux386

@fwessels Do you have time to look at this?

I suspect we should disable AVX2 on non-AMD64 platforms here:

defaultOptions.useAVX512 = cpuid.CPU.AVX512F() && cpuid.CPU.AVX512BW()

@klauspost oh,yes.
And I found the library "github.com/klauspost/cpuid" show the server support cpuid.CPU.AVX512F() , cpuid.CPU.AVX512BW() both when GOARCH set 386 and amd64,but anthoer lib "github.com/intel-go/cpuid" said the server not support AVX512 when GOARCH set 386,so I need fork and disable it Manually?thanks

I think AVX512 is available on i386, so not reporting it would be wrong.

The avx512 code is only made for 64 bits, so the problem is in this package.

If you need a quick fix just set the line above to false.

@klauspost oh,thanks,maybe I will wait your commit if you have time,that will be great!So I will close this issue.

If you don't mind, I would like to keep it open, since it is an issue that should be fixed. Thanks for reporting it!

v1.9.2 released