Unit test of safeMalloc with createRecord