Analysis of Valgrind log for boost::uuid

泄露秘密 提交于 2019-12-02 04:51:27
Sikor

Please check http://www.boost.org/doc/libs/1_50_0/libs/uuid/uuid.html

The boost::uuids::basic_random_generator class default constructor seeds the random number generator with a SHA-1 hash of a number of different values including std::time(0), std::clock(), **uninitialized data**, value return from new unsigned int, etc..

...Using Valgrind produces a number of false positives with the default constructor of boost::uuids::basic_random_generator. One solution is to suppress the errors as described in Valgrind's documentation. Another solution is to use a different constructor of boost::uuids::basic_random_generator and explicitly pass in a random number generator.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!