First Chance Exception Problem in VC Debug

xiaoxiao2021-03-06  21

Check the following information and discover related to virtual memory allocation.

First-chance is basically like this

1. The memory of Virtualalloc allocation (heap growth requires Virtualalloc) is not immediately valid, just in the page table item. 2. The reason that is not immediately assigned is that every process has a work set, approximately 120k, 3. When the process first accesses the memory address, generate a first-chance access viology, thread hang, go to Ring 0, the system finds that the memory is indeed allocated, commit, if this address is not assigned, an exception is generated (called Second-Chance Access) 0xC0000005.

That is, if you do not generate Second-Chance Viocation, you will not affect the program.

First-Chance Exception indicates that the program runs an Access Violation, but is captured by the exception handler in a module you use. The debugger uses this way to inform you that an exception has occurred. In the debug state, open the Exception dialog under the debug menu, change the Access Viological action to Stop always, then there is an exception, the debugger will pop up a dialog report this exception, and stop in the abnormality Not just in the Output window reported First-Chance Exception, which helps you locate anomalous position.

Sigh!

转载请注明原文地址:https://www.9cbs.com/read-40197.html

New Post(0)