fix crash bugs that too large size local varialbe will cause stack overflow