I am not sure how OpenCL specification regulates this, but in the current AMD implementation 0 is a valid local address. I think the address 0 or NULL pointer should be reserved, since a GPU has 32k, a pretty large, local memory, so that we can use the same code for CPU, like:
If (ptr)
ptr = ptr->next;
Just a fancy idea