Failing Tests (Panic) on ppc64el
nileshpatra opened this issue · 1 comments
nileshpatra commented
Hi,
Thanks for your work on this package. However, while running tests on ppc64el, the brainpool/brainpool_test.go
gives out panic error messages:
$ go test -v ./brainpool
=== RUN TestP256r1
--- FAIL: TestP256r1 (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x11695c]
goroutine 6 [running]:
testing.tRunner.func1.2({0x142a40, 0x246950})
/usr/lib/go-1.17/src/testing/testing.go:1209 +0x27c
testing.tRunner.func1(0xc00012e000)
/usr/lib/go-1.17/src/testing/testing.go:1212 +0x228
panic({0x142a40, 0x246950})
/usr/lib/go-1.17/src/runtime/panic.go:1038 +0x240
crypto/elliptic.matchesSpecificCurve(0xc00007e6c0, {0xc000104d80, 0x3, 0x3})
/usr/lib/go-1.17/src/crypto/elliptic/elliptic.go:45 +0x7c
crypto/elliptic.(*CurveParams).ScalarBaseMult(0xc00007e6c0, {0xc00001a080, 0x20, 0x20})
/usr/lib/go-1.17/src/crypto/elliptic/elliptic.go:313 +0xbc
github.com/ProtonMail/go-crypto/brainpool.(*rcurve).ScalarBaseMult(0xc0000101e0, {0xc00001a080, 0x20, 0x20})
/home/nilesh/proto/go-crypto/brainpool/rcurve.go:82 +0x54
crypto/ecdsa.GenerateKey({0x190208, 0xc0000101e0}, {0x18d3c0, 0xc00007a1e0})
/usr/lib/go-1.17/src/crypto/ecdsa/ecdsa.go:158 +0x168
github.com/ProtonMail/go-crypto/brainpool.testCurve(0xc00012e000, {0x190208, 0xc0000101e0})
/home/nilesh/proto/go-crypto/brainpool/brainpool_test.go:11 +0x50
github.com/ProtonMail/go-crypto/brainpool.TestP256r1(0xc00012e000)
/home/nilesh/proto/go-crypto/brainpool/brainpool_test.go:32 +0x80
testing.tRunner(0xc00012e000, 0x168828)
/usr/lib/go-1.17/src/testing/testing.go:1259 +0xe8
created by testing.(*T).Run
/usr/lib/go-1.17/src/testing/testing.go:1306 +0x370
FAIL github.com/ProtonMail/go-crypto/brainpool 0.006s
FAIL
Could you check what might be wrong?
===================================================================================================
CC: @twiss