Merge "Fix tzalloc(nullptr) and add a test."