Hi,
This one is giving me really hard time. I'm trying to build crypto++ with
msvc / windows - compilation works fine, but always when I want to use the
lib I keep getting
block at 0x000001362708B180 was not allocated by _aligned routines, use
free()
After debugging the code I can see that the problem is in allocate.cpp
void AlignedDeallocate(void *p)
{
// Guard pointer due to crash on AIX when CRYPTOPP_NO_ALIGNED_ALLOC
// is in effect. The guard was previously in place in SecBlock,
// but it was removed at f4d68353ca7c as part of GH #875.
CRYPTOPP_ASSERT(p);
if (p != NULLPTR)
{
#ifdef CRYPTOPP_MM_MALLOC_AVAILABLE
_mm_free(p);
#elif defined(CRYPTOPP_NO_ALIGNED_ALLOC)
p = (byte *)p - ((byte *)p)[-1];
free(p);
#else
free(p);
#endif
}
}
If I understand it correctly then the allocation wasn't done with aligned,
but with malloc?
Did anyone had similar issue?
Just on the side I'm of course hitting the old, where _MSC_VER and
__clang__ are defined. SO far I haven't find any workaround on this either.
// discussed at http://github.com/weidai11/cryptopp/issues/147.
#if (defined(_MSC_VER) && defined(__clang__) && \
!(defined( __clang_analyzer__)) && !defined(__INTEL_LLVM_COMPILER))
# error: "Unsupported configuration"
#endif
Will be more than thankful for any kind of help in this.
Regards,
/m
--
You received this message because you are subscribed to the Google Groups
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/cryptopp-users/f5c5b3aa-2fee-487b-9142-48ad297049d9n%40googlegroups.com.