Update comments

This commit is contained in:
Jeffrey Walton 2018-07-30 15:18:59 -04:00
parent 36318790a2
commit 4fc5b8da13
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -447,18 +447,20 @@ private:
// If we can't control alignment through CRYPTOPP_ALIGN_DATA then we
// should probably avoid this allocator.
//
// Platforms that probably experience trouble at this point are AIX and
// Solaris when Sun Studio is less than 12.0 or 12.1. The easiest way
// to check is a Debug build so asserts are enabled. Then look for an
// assert to fire on m_allocated when the dtor runs. For Sun Studio 12
// we were able to clear the assert by using __attribute__(aligned).
// Platforms that experience trouble at this point are AIX and Solaris
// when Sun Studio is less than 12.0 or 12.1. The easiest way to check
// is a Debug build so asserts are enabled. Then look for an assert to
// fire on m_allocated when the dtor runs. For Sun Studio 12 we were
// able to clear the assert by using __attribute__(aligned). However
// Sun Studio 11 and earlier still have the problem.
//
// Something else that troubles me about the machinery below is, we
// can't use std::ptrdiff_t in place of the byte* and size_t casts. I
// believe ptrdiff_t the only way to safely calculate the aligned
// address due to the subtraction. Attempts to use ptrdiff_t result in
// crashes or SIGSEGV's. That's probably a good sign we should switch to
// something else, like a SecBlock backed by a heap allocation.
// address due to the pointer subtraction. Attempts to use ptrdiff_t
// result in crashes or SIGSEGV's. That's probably a sign we should
// switch to something else without the twiddling, like a SecBlock
// backed by an aligned heap allocation.
#ifdef __BORLANDC__
T* GetAlignedArray() {return m_array;}