zhztheplayer commented on code in PR #8477:
URL: https://github.com/apache/incubator-gluten/pull/8477#discussion_r1910362391
##########
cpp/core/memory/MemoryAllocator.cc:
##########
@@ -157,7 +157,7 @@ bool StdMemoryAllocator::reallocate(void* p, int64_t size,
int64_t newSize, void
}
bool StdMemoryAllocator::reallocateAligned(void* p, uint64_t alignment,
int64_t size, int64_t newSize, void** out) {
- if (newSize <= 0) {
+ if (newSize <= 0 || p == nullptr) {
Review Comment:
Can we throw exceptions (and other changes as well)? Since it's not usual to
have a nullptr passed in for such functions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]