compiler does not catch this memcheck problem