| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Wraps memcpy in the cases where we really are doing a type conversion
using memcpy
|
|
|
|
| |
This is primarily just to verify that C++11 constexpr works.
|
|
|
|
|
|
|
|
|
|
| |
This previously enabled doing something unsafe (misaligned reads),
but it turns out even on hardware that supports this, it is not
safe to do because the compiler may do something unfortunate.
Now memcpy is used, which is safe on any platform.
Should provide a noticable speedup for ARM and PPC64, which previously
used the byte-at-a-time fallback code.
|
|
|
|
|
| |
Things like -Wconversion and -Wuseless-cast that are noisy and
not on by default.
|
|
|
|
|
|
| |
ISO C++ reserves names with double underscores in them
Closes #512
|
|
|
|
|
|
| |
Renames a couple of functions for somewhat better name consistency,
eg make_u32bit becomes make_uint32. The old typedefs remain for now
since probably lots of application code uses them.
|
|
|
|
|
|
|
|
| |
All this is just standard C that the user should not touch, so it doesn't
really make sense to have it in the build.h template file.
Remove BOTAN_TARGET_CPU_HAS_KNOWN_ENDIANESS - only used twice (in loadstor.h)
and that code is clearer without it.
|
|
|
|
| |
Turns out MSVC 2013 doesn't have constexpr at all (!!)
|
|
|
|
| |
Remove unused and empty get_byte.h
|
|
|
|
| |
compiler warnings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It works on x86, but C says it is undefined and it makes UBSan
unhappy. Happily, this memcpy approach probably also works fine under
processors which previously used the byte-at-a-time approach such as
ARM. But for right now using memcpy here is still gated under the
processor alignment flags.
In my tests recent GCC and Clang seemed to produce basically identical
code for either approach when using -O3; I imagine most compilers
these days are very good at analyzing/inlining/unrolling memcpys.
Also remove the manually unrolled versions of xor_buf, which caused
problems with GCC and -O3 due to it vectorizing the loads into
(aligned) SSE2 loads, which would fail when a misaligned pointer was
passed. Which always seemed kind of bogus to me, but I guess that's
what undefined behavior is for. Enable -O3 for GCC.
With this change the test suite is clean under GCC ASan+UBSan and
Clang ASan+UBSan, with the exception of one failure due to a bug in
libstdc++ (GCC bug 60734) when compiled by Clang.
|
|
|
|
|
|
|
|
|
|
| |
Calling memset, memmove, memcpy with an undefined or null pointer,
even with length zero, causes undefined behavior. Prevent that from
happening within the functions that call these dangerous things
since allowing a caller to pass length == 0 with null or just
past the end and not have things explode is nice.
Oh C, you so crazy.
|
|
|
|
| |
Only user-visible change is the removal of get_byte.h
|
| |
|
|
|
|
| |
See github 42 for background
|
|
|
|
|
| |
Update license header line to specify the terms and refer to the file,
neither of which it included before.
|
| |
|
|
|
|
|
| |
Define some new functions for copying out arrays of words and use them
across hashes.
|
|
|