Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error spam on macos #3

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading