新的分割错误

时间:2016-11-13 21:36:03

标签: c++ segmentation-fault new-operator

我不确定这是否是g ++的问题,或者某种方式我的编译器搞砸了但是我的程序一开始就遇到新错误。我已经测试了所有内容,而且任何新的实例都给我一个错误,即使是这样简单的事情:

int main(int argc, char *argv[]) {
    new char[12];
    return 0;
}

堆栈追踪:

#0  0x7703636d in ntdll!RtlAllocateHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x77035125 in ntdll!RtlAllocateHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x77034fc2 in ntdll!RtlAllocateHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#3  0x770cece6 in ntdll!RtlpNtSetValueKey () from C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x77037656 in ntdll!RtlAllocateHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#5  0x77035125 in ntdll!RtlAllocateHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#6  0x77034fc2 in ntdll!RtlAllocateHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#7  0x765e79b0 in msvcrt!malloc () from C:\WINDOWS\System32\msvcrt.dll
#8  0x6fef4a79 in ?? () from C:\MinGW\bin\libstdc++-6.dll
#9  0x6fef4a1f in ?? () from C:\MinGW\bin\libstdc++-6.dll
#10 0x00401a5c in main (argc=2, argv=0x7679b0) at C:\Users\Mackenzie\Desktop\School\ECE150\Project\Parser\parser.cpp:2

0 个答案:

没有答案