Skip to content

Commit

Permalink
Merge pull request #3 from drewcassidy/master
Browse files Browse the repository at this point in the history
Fix error spam on macos
  • Loading branch information
JulianGro authored Jun 10, 2024
2 parents 2a56c23 + 1f3d883 commit 758eb3e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/nvcore/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,12 @@ namespace nv
{
inline bool isValidPtr(const void * ptr) {
#if NV_CPU_X86_64 || POSH_CPU_PPC64 || NV_CPU_AARCH64
if (ptr == NULL) return true;
if (reinterpret_cast<uint64>(ptr) < 0x10000ULL) return false;
if (ptr == nullptr) return true;
// MACH_VM_MIN_ADDRESS == 0
# ifndef __MACH__
if (reinterpret_cast<uint64>(ptr) < 0x10000ULL) return false;
#endif

if (reinterpret_cast<uint64>(ptr) >= 0x000007FFFFFEFFFFULL) return false;
#else
if (reinterpret_cast<uint32>(ptr) == 0xcccccccc) return false;
Expand Down

0 comments on commit 758eb3e

Please sign in to comment.