Commit Graph

219 Commits

Author SHA1 Message Date
James E. King III
ca0185f9f2 add a big-endian bdde travis ci job to prove endian issues resolved 2019-06-25 13:21:13 -04:00
James E. King III
cc9648b68c Add BOOST_UUID_COMPAT_PRE_1_71_MD5 compatibility mode 2019-06-25 13:21:13 -04:00
James E. King III
eabf964e98 Fix endian issue copying md5 result to byte buffer.
Fix the sha1 and md5 unit tests for endian correctness.
Originally identified by BinCaoWR in GitHub issue #86 and PR #87

This fixes #86
This closes #87
2019-06-25 13:21:13 -04:00
James E. King III
5e55711b59 Add asan and tsan travis jobs 2019-06-10 10:54:53 -04:00
James E. King III
79b73f63af Add a clang-win build job [skip travis] 2019-06-10 06:44:50 -04:00
James E. King III
a49929bd06 Reduce overall CI resources with less cxxstd combinations. 2019-06-08 06:33:30 -04:00
James E. King III
e972f80a6d Add gcc-9 CI job on Travis CI 2019-06-08 06:33:30 -04:00
James E. King III
a165661012 Add Visual Studio 2019 CI job on Appveyor 2019-06-08 06:33:30 -04:00
James E. King III
be5876a0fc Try gcc-8 and gcov-8 to improve coverage results (maybe) 2019-05-03 20:35:10 -04:00
tinko92
24e3e0db36 Fix for typo (LICENCE) and for https links to license (#103)
* Fix Typo in link to License.
* Changed links to https.
2019-04-22 08:56:05 -04:00
James E. King III
638f72a70c fix coverity scan 2019-04-19 22:42:05 -04:00
Andrey Semashev
abfb3a918a Implement std::hash in terms of hash_value.
Not only it makes the two implementations equivalent, it also fixes the bug
of to_string throwing an exception in the noexcept function. It is also
more efficient as there is no need for the temporary string construction.
2019-04-19 06:45:24 -04:00
Andrey Semashev
bc789d8a76 Disable getentropy backend on Linux and Android.
Since getentropy is implemented via getrandom in Linux kernel, getentropy
cannot work if the kernel doesn't support getrandom. Given this, there is
no reason to ever use getentropy on Linux.

We used to allow this backend based on glibc version check, but there are
configurations where a newer glibc is running with an older kernel, and
getentropy always fails in runtime. Disabling getentropy in such cases
allows to fall back to the generic POSIX backend.
2019-04-19 06:44:25 -04:00
tomy2105
32469a666d Avoid undefining BOOST_AUTO_LINK_NOMANGLE
Avoid undefining BOOST_AUTO_LINK_NOMANGLE if it was previously defined.
2019-04-19 06:44:04 -04:00
James E. King III
614108a584 Refresh CI scripts 2019-04-19 06:43:37 -04:00
Marcel Raad
2400f69519 Fix -Wmissing-noreturn clang warning
Mark function only consisting of a BOOST_THROW_EXCEPTION statement as
BOOST_NORETURN.
According to [0], "Callers of throw_exception are allowed to assume
that the function never returns", and the two predefined versions are
marked with BOOST_NORETURN.

[0] https://www.boost.org/doc/libs/1_69_0/libs/exception/doc/throw_exception.html
2019-02-25 15:31:04 -05:00
Marcel Raad
695c6782c6 Fix -Wextra-semi clang warning
Remove a superfluous semicolon after a function definition.
2019-02-25 15:31:04 -05:00
James E. King III
14a90261c7 Update Travis CI build jobs 2018-11-02 12:44:21 -04:00
James E. King III
cbf098f298 Expanded windows CI tests for more coverage 2018-11-02 08:21:54 -04:00
James E. King III
527686352c Expand Travis CI build coverage 2018-10-28 10:42:04 -04:00
James E. King III
92cf9dd7d4 Make entropy_error default visible
See https://github.com/boostorg/function/pull/24 as to why.
2018-10-25 12:21:49 -04:00
James E. King III
496c0c8ee5
Update sha1.hpp header, it had the wrong path in it. 2018-10-17 19:33:43 -04:00
James E. King III
9b1988001f fix test code warning in matrix build: hides previous local declaration 2018-10-12 08:12:23 -04:00
Andrey Semashev
2c142e311a Disabled getrandom provider on Android prior to API version 28.
Android supports getrandom and getentropy functions only since API version 28.

As part of the fix converted Linux/Android platform detection from Boost.Predef
to direct checks of platform-specific macros. This is to work around
Boost.Predef problem described in [1] - depending on header inclusion order
Boost.Predef may indicate Linux or Android. When that problem is fixed we
may change back to Boost.Predef.

Fixes https://github.com/boostorg/uuid/issues/76.

[1]: https://github.com/boostorg/predef/issues/81#issuecomment-413329061
2018-08-19 10:36:00 -04:00
James E. King III
9522a13919 fix failing ci jobs in travis 2018-07-14 17:42:41 +00:00
Andrey Semashev
405f961431 Add support for Linux-specific getrandom call to obtain random data.
getrandom is the base implementation for getentropy on Linux. It is also
available in the form of a syscall, which can be called directly on systems with
glibc versions older than 2.25 which don't yet provide wrappers for getrandom or
getentropy but have a recent enough Linux kernel (for example, Debian Stretch).

On systems other than Linux (e.g. Solaris) getentropy is documented as a
source for initialization of a user-space PRNG instead of a direct source
for random data. Since we use the random data directly to initialize UUIDs,
using getrandom on other platforms, where available, would be more preferable
than getentropy. Unfortunately, the only other platform that is known to support
both getentropy and getrandom (Solaris) documents getrandom to return 0
on error, which is a valid return value on Linux. It's not clear if this is
a documentation error or a true incompatibility, and I have no way to test,
so do not use getrandom on Solaris for now. For this reason (and in case
if it is also used on some other platforms) getentropy backend is still
preserved.

For running tests in the CI on the getentropy backend added the
BOOST_UUID_RANDOM_PROVIDER_DISABLE_GETRANDOM macro, which will disable getrandom
if one is detected. Currently, the macro is only used for tests on Linux.
2018-06-18 10:27:40 -04:00
Andrey Semashev
4a9f620b6d Add support for movability to random generators. Fix POSIX random provider.
The commit adds support for move constructors and assignment to random UUID
generators and random providers. Also, in POSIX random provider, the commit
improves handling of return value from ::read(), which returns -1
in case of error and may return 0 in case of success. Retry the call when
it was interrupted before reading any bytes from /dev/urandom.

Added new tests for movability and compile-fail tests for no copyability.

This addresses GitHub issue:

https://github.com/boostorg/uuid/issues/71
2018-06-18 10:24:46 -04:00
James E. King III
0d0aa876e5 Merge branch 'master' into develop 2018-06-17 11:48:31 +00:00
James E. King III
ed64c1cfab re-add limited benchmark ci environment setting 2018-06-17 11:48:02 +00:00
James E. King III
2426074963 move ci to boost-ci model 2018-06-17 07:43:17 -04:00
James E. King III
1e79294e1b fix name in meta 2018-05-17 17:32:55 +00:00
James E. King III
a29e092870 fix compile error on MSVC2010 with new std::hash adapter 2018-05-15 21:17:01 -04:00
James E. King III
3f480ed032 make valgrind exit with error status on failure 2018-05-15 21:17:01 -04:00
James E. King III
33da3e2a5b issue-65: remove deprecated sha1 header compatibility redirect which was moved to detail in the last release 2018-05-08 13:50:25 -04:00
James E. King III
903e8928f6 issue-59: add std::hash support header 2018-05-07 07:54:31 -04:00
James E. King, III
aeffc013c0 Work around a gcc-7.3 issue running ubsan on travis CI
https://stackoverflow.com/questions/50024731/ld-unrecognized-option-push-state-no-as-needed
2018-04-29 10:14:03 -04:00
James E. King, III
7131140659 Add license file 2018-04-29 10:14:03 -04:00
James E. King, III
ef41a4ca08 Work around a gcc-7.3 issue running ubsan on travis CI
https://stackoverflow.com/questions/50024731/ld-unrecognized-option-push-state-no-as-needed
2018-04-29 09:59:01 -04:00
James E. King, III
0354bbdc92
Add license file 2018-04-29 09:57:56 -04:00
James E. King III
fa64dc450c Merge branch 'develop' of github.com:boostorg/uuid 2018-04-27 19:33:50 +00:00
James E. King III
25de969656 fix uuid test bjam dependency declarations
This fixes #60
2018-03-28 13:07:53 -04:00
James E. King III
d3eb2b250a fix uuid test bjam dependency declarations
This fixes #60
2018-03-26 19:17:31 -04:00
James E. King, III
d37088ab07 synchronize changes with winapi for bcrypt availability
This fixes #63
2018-03-26 16:04:12 -04:00
Andrey Semashev
5fc3a4fa4f Switch WINAPI calling convention macros to the replacements from Boost.WinAPI
WINAPI macro definition in Boost.WinAPI is deprecated as it may clash with the
macro defined in Windows SDK.
2018-03-12 07:35:47 -04:00
James E. King III
421aa369ec improve code coverage results processing 2018-03-07 15:35:49 -05:00
James E. King III
6449735726 Update README 2018-01-28 08:48:24 -05:00
James E. King III
74546c27cc remove unnecessary file 2018-01-28 08:10:48 -05:00
James E. King III
39f6b5cc4b enable coverity scan builds on push or cron jobs in master and develop 2018-01-23 11:21:40 -05:00
James E. King III
4b417d816d add cygwin 32 and 64-bit builds, and mingw 32-bit builds to appveyor 2018-01-21 21:19:15 -05:00
James E. King III
0e0c9dc850 update ci build for cppcheck and ubsan 2018-01-21 21:15:38 -05:00