|
Author:
{'email': 'jesse@mongodb.com', 'username': 'ajdavis', 'name': 'A. Jesse Jiryu Davis'}
Message: CDRIVER-2600 don't rely on _attribute_((weak))
We had cargo-culted a constant-time comparison function from libsodium. We use
the "weak" attribute if the compiler supports it, to prevent the constant-time
comparison function from being compiled out during link-time optimization if
the program doesn't use its result. But we don't need to prevent link-time
optimization: we always use our comparison function's result.
The variables had been declared volatile to prevent an aggressive optimizer
from pre-computing the result if both input values are known at compile time.
This also does not apply to our usage.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/edc686ead99eb3c762aa606e048d16480bce627e
|