Phenomenon:
The specific scenario is detected in New allocated memory, and the VS output information is: Critical Error Detected C0000374 is normal on X64, X86 is crashed
This occurs when memory is allocated, but this is the kernel-mode address area, which the heap manager cannot specify. So it’s clear that the heap data has been tampered with by overflow, which is heap corruption. The next step is to find out where the data overflow is occurring.
Analysis:
Debug looks at the normal allocation of memory, generally this is caused by the array out of bounds.
If not this time, then probably the last time the memory assignment crossed the line, causing the heap to break.
Solutions:
Find the location of the last memory allocation in the code, add 1 to the length, normal. Problem solving.
Int Buflen = 100;
_PRTA(unsigned char,ScaleBuf,Buflen + 1); //
Here is the smart pointer used; Unsigned char (unsigned char) does not need to store the end char. In theory, it does not need to add 1.
Conclusion:
In this case, basically the memory assignment is out of bounds, so let’s see if this is the case in the code above;
1. Memory allocation is short 1, 2. Memory assignment is out of bounds and the length is over. Such as memset ();
The specific scenario is detected in New allocated memory, and the VS output information is: Critical Error Detected C0000374 is normal on X64, X86 is crashed
This occurs when memory is allocated, but this is the kernel-mode address area, which the heap manager cannot specify. So it’s clear that the heap data has been tampered with by overflow, which is heap corruption. The next step is to find out where the data overflow is occurring.
Analysis:
Debug looks at the normal allocation of memory, generally this is caused by the array out of bounds.
If not this time, then probably the last time the memory assignment crossed the line, causing the heap to break.
Solutions:
Find the location of the last memory allocation in the code, add 1 to the length, normal. Problem solving.
Int Buflen = 100;
_PRTA(unsigned char,ScaleBuf,Buflen + 1); //
Here is the smart pointer used; Unsigned char (unsigned char) does not need to store the end char. In theory, it does not need to add 1.
Conclusion:
In this case, basically the memory assignment is out of bounds, so let’s see if this is the case in the code above;
1. Memory allocation is short 1, 2. Memory assignment is out of bounds and the length is over. Such as memset ();
Read More:
- Solve the problem of VC 6.0 fatal error C1033: cannot open program database’.\debug\vc60.pdb’
- Solve the problem of VC6.0 open crash and OpenGL glut32.lib library
- Solution to the problem of no C / C + + option in the new project of eclipse
- Windows 10 critical_service_failed solution
- On the problem of QT program open crash
- error C2471: cannot update program database vc90.pdb
- Error c2064: term does not evaluate to a function in VC
- The solution of white screen crash when loading QML
- Endnote inserting documents causes word to crash! ! Solution
- Solve the problem of error: cannot pass objects of non trivially copyable type ‘STD:: String’ in C / C + +
- Solution to the problem of console output window’s CMD flashing back when vs2015 writes C + + program
- Duplicate keys detected: ‘XXXX’. This may cause an update error. Solution
- Error lnk2038: detected “0”_ ITERATOR_ DEBUG_ The reason and solution of the unmatched item of “level”
- The use of Chinese characters in Qt and the solution to the “error C2001: newline in constant” problem
- Solution to the flash of running result of dev C / C + +
- Alpine Linux executable file crash report error / lib / x86 not found_ 64 Linux GNU / libc.so solution
- Error: unrecognized command line option “-std=c++11”, to solve the problem that ubuntu does not support c++11
- C language problem: 0xc0000005: access conflict occurred when writing to location 0xffffcc.
- *When Lenovo computer starts, 0190 appears: critical low battery error