0xC0000005; Access violation (the stack space is very valuable, Linux on the stack space default to 8M,VC6 under the default stack space size of 1M)

Source: Internet
Author: User

Write-C + + programs are most afraid of the emergence of such a hint, fortunately, in the debugging environment displayed, in the non-debug state of the direct crash exit.

From the above assembly code found in the memory address eax+38h the value of error, which means that the address is illegal Bai, can not access, is generally accessed by the null pointer.

The direct call to the Qlist::append () method also makes an error, and the Assembly also points to an error while reading the memory ebp-8. This code runs against the background of applying a lot of buffers on the stack, and then the buffer is constantly adding content until a certain stage of the program crashes. Because the stack space is very valuable, the Linux stack space defaults to 8M,VC6 the default stack space size is 1M, when the data on the stack is too large, the stack area has been damaged , this time access to an invalid memory address. So the program often out of some inexplicable its wonderful collapse, debugging location to the code is also very normal , this should be noted, whether the stack on the data is too large, has been damaged. When manipulating large amounts of data, it is best to allocate on the heap.

http://tcspecial.iteye.com/blog/1909831

0xC0000005; Access violation (the stack space is very valuable, Linux on the stack space default to 8M,VC6 under the default stack space size of 1M)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.