Analysis: sync array output function, should make sure that all used pointers are valid before using them.