how the stackoverflow affect variable ?
A stack overflow normally means that your application will exit immediately. Therefore the effect will be that all process-related memory will be released, including your variables.