zhztheplayer commented on code in PR #8477:
URL: https://github.com/apache/incubator-gluten/pull/8477#discussion_r1910376926


##########
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:
   Could refer to the macros in 
https://github.com/apache/incubator-gluten/blob/6d71d27884dd6bda38848cb012a63fb37ee2d298/cpp/core/utils/Exception.h#L42
 if needed



-- 
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]

Reply via email to