mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Update comments
This commit is contained in:
parent
36318790a2
commit
4fc5b8da13
18
secblock.h
18
secblock.h
@ -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;}
|
||||
|
Loading…
Reference in New Issue
Block a user