| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
SecBlock regularly uses NULL pointers rather returning non-NULL 0-sized pointers. The asserts were moved to AlignedAllocate and UnalignedAllocate.
|
| |
|
|
|
|
| |
This should match the behavior of allocate
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This assert checks the array we return to the caller is large enough. Spoiler alert... it is not always large enough, like on 64-bit AIX. The linker on AIX appears to align smaller than 8-bytes
|
|
|
|
| |
The specialization pivoted on T_Align16 so it is not longer a template parameter
|
| |
|
|
|
|
|
| |
Commit afbd3e60f68f effectively treated a symptom and not the underlying problem. The problem was linkers on 32-bit systems ignore CRYPTOPP_ALIGN_DAT(16) passed down by the compiler and align to 8-bytes or less. We have to use Wei's original code in some places. It is not a bad thing, but the bit fiddling is something we would like to contain a little more by depending more on language or platform features.
This commit keeps the original changes which improve partial specializations; but fixes 32-bit linker behavior by effectively reverting afbd3e60f68f and e054d36dc88d00. We also add more comments so the next person has understands why things are done they way they are.
|
|
|
|
|
|
|
| |
These fixes were interesting in a morbid sort of way. I thought the FixedSizeAllocatorWithCleanup specializations faithfully reproduced semantics but I was wrong on Win32 and Sparc. Also see Commit e054d36dc88d.
It seems there was another requirement or dependency that we missed, but it was not readily apparent. If I am parsing results correctly (which I may not be), it appears the bit twiddling using 8 byte alignment had more influence on alignment than I originally thought based on use of CRYPTOPP_BOOL_ALIGN16 and T_Align16. Or maybe the alignment attributes specified by CRYPTOPP_ALIGN_DATA are not being honored like they should for stack allocations.
This check-in avoids some uses of x86 movdqa (aligned) in favor of movdqu (unaligned). The uses were concentrated on memory operands which were 8-byte aligned instead of 16-byte aligned. It is not clear to me how the specializations lost 8-bytes of alignment. The check-in also enlists CRYPTOPP_ASSERT to tell us when there's a problem so we don't need to go hunting for bugs.
|
|
|
|
|
| |
This allocator still has some demons buried inside due to the bit fiddling. This commit should isolate the demons to aligned stack allocations when an alignment facility from the platform or OS is not available. That is, we use CRYPTOPP_ALIGN_DATA when we can because it is most reliable.
We can tell when things have gone sideways using Debug builds. The CRYPTOPP_ASSERT(m_allocated) will fire on destruction because the flag gets overwritten.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* remove superfluous semicolon
* Remove C-style casts from public headers
clang warns about them with -Wold-style-cast. It also warns about
implicitly casting away const with -Wcast-qual. Fix both by removing
unnecessary casts and converting the remaining ones to C++ casts.
|
|
|
|
| |
A package called cpprest provides U as a macro
|
| |
|
|
|
|
| |
Also see https://groups.google.com/forum/#!topic/cryptopp-users/A7-Xt5Knlzw
|
| |
|
|
|
|
| |
Since removing the allocator overloards that handled the wipe mark, we have to route deallocate into the standard one. The standard one fires an assert for [now] normal operation
|
|
|
|
| |
This should have been yanked when we removed the same for allocate
|
| |
|
|
|
|
|
| |
pull request. (#482)
Thank you very much.
|
|
|
|
| |
partial C++ 2011 support). (#477)
|
|
|
|
| |
Take 2
|
| |
|
| |
|
|
|
|
| |
Also see commit 42b7c4ea5673.
|
|
|
|
| |
This may create a MSC warning about a conditional expression being constant
|
| |
|
|
|
|
| |
Reset the mark on additional class methods
|
|
|
|
| |
Also see http://github.com/weidai11/cryptopp/issues/448
|
|
|
|
| |
This cleanup was performed using Clang and -Wdocumentation -Wno-documentation-deprecated-sync
|
|
|
|
| |
This reverts commit c3871aec948013c1a4d5613050c659520f59e2e4.
|
|
|
|
| |
This reverts commit eb3b27a6a543. The change broke GCC 4.8 and unknown version of Clang on OS X. UB reported the OS X break, and JW found duplicated the break on a ARM CubieTruck with GCC 4.8.
|
| |
|
| |
|
| |
|
|
|
|
| |
Crypto++ 5.7 was the increment after the 5.6.5 release. Crypto++ 6.0 accurately reflects compatibility
|
|
|
|
|
| |
Move bodies out-of-line
Whitespace
|
|
|
|
|
| |
By default the member, named m_mark, is set to the maximum number of elements. If SetMark() is called, then m_mark is adjusted. Upon deallocation and zeroization, STDMIN(m_size, m_mark) elements are zeroized.
We wanted to use a high water mark, but we could not track the writes to the allocation. operator[] would have been OK, but ::memcpy would have been problematic
|
|
|
|
| |
We have made a fair number of changes, and we don't want WD to receive credit for issues he was not part of
|
|
|
|
| |
trap.h and CRYPTOPP_ASSERT has existed for over a year in Master. We deferred on the cut-over waiting for a minor version bump (5.7). We have to use it now due to CVE-2016-7420
|
|
|
|
| |
validat1.cpp (Issue 256)
|