Branch: refs/heads/master
Home: https://github.com/conformal/btcec
Commit: da74b98565c85e8f856173985efc37d44507e6e7
https://github.com/conformal/btcec/commit/da74b98565c85e8f856173985efc37d44507e6e7
Author: Dave Collins <[email protected]>
Date: 2015-01-15 (Thu, 15 Jan 2015)
Changed paths:
M btcec.go
Log Message:
-----------
Fix a benign race detected by the race detector.
The addition of the pre-computed values for the ScalarBaseMult
optimizations added a benign race condition since a pointer to each
pre-computed Jacobian point was being used in the call to addJacobian
instead of a local stack copy.
This resulted in the code which normalizes the field values to check for
further optimization conditions such as equal Z values to race against the
IsZero checks when multiple goroutines were performing EC operations since
they were all operating on the same point in memory.
In practice this was benign since the value was being replaced with the
same thing and thus it was the same before and after the race, but it's
never a good idea to have races.