If a variable is created on the stack, it will get deleted when the function in which it is created exits. So presumably a pointer to such a variable cannot be returned from the function and nor can it be passed to another thread (unless you're certain the other thread won't use it after the function in which it was created exits.)
Is it legitimate to pass a pointer to a location on the stack as an argument to another function, if it's part of the api contract of the other function that it will do everything with that pointer in the same thread?
This is not quite the same; the pointer is being used after the original function ends.