Question: This causes an `AccessViolationException` to be thrown:

```
using System;

namespace TestApplication
{
    internal static class Program
    {
        private static unsafe void Main()
        {
            ulong* addr = (ulong*)Int64.MaxValue;
            ulong val = *addr;
        }
    }
}

```

This causes a `NullReferenceException` to be thrown:

```
using System;

namespace TestApplication
{
    internal static class Program
    {
        private static unsafe void Main()
        {
            ulong* addr = (ulong*)0x000000000000FF;
            ulong val = *addr;
        }
    }
}

```

They're both invalid pointers and both violate memory access rules.
Why the NullReferenceException?

Answer: 
A null reference exception and an access violation exception are both raised by the CPU as an access violation. The CLR then has to guess whether the access violation should be specialized to a null reference exception or left as the more general access violation.

It is evident from your results that the CLR infers that access violations at addresses very close to 0 are caused by a null reference. Because they were almost certainly generated by a null reference plus field offset. Your use of unsafe code fools this heuristic.
from <http://msdn.microsoft.com/en-us/library/system.accessviolationexception.aspx>

> 
> Version Information
> 
> 
> This exception is new in the .NET Framework version 2.0. In earlier
>  versions of the .NET Framework, an access violation in unmanaged code
>  or unsafe managed code is represented by a NullReferenceException in
>  managed code. A NullReferenceException is also thrown when a null
>  reference is dereferenced in verifiable managed code, an occurrence
>  that does not involve data corruption, and there is no way to
>  distinguish between the two situations in versions 1.0 or 1.1.
> 
> 
> Administrators can allow selected applications to revert to the
>  behavior of the .NET Framework version 1.1. Place the following line
>  in the Element section of the configuration file for the
>  application:
> 
> 
> other `<legacyNullReferenceExceptionPolicy enabled = "1"/>`
> 
> 
>