fix bootstrap memset safe heap access