I have a very simple program that I don't know why a crash occurs on exit. My main function is a simple cout<<"Hello world";
But I've added another cpp file:
system_information.cpp:
system_information::system_information() { threadid_processid_map[22]=23; processor_processid_map[128] = { 0L }; processor_threadid_map[128] = { 0L }; } And the header file looks like:
system_information.h
class system_information{ public: DWORD processor_processid_map[128]; DWORD processor_threadid_map[128]; unordered_map<DWORD, DWORD> threadid_processid_map; system_information(); }; And I simply have this file to declare in instance of my class:
parse.cpp:
#include "system_information.h" system_information sys_info; My program crashes on exit on crt0at.c at this line:
onexitbegin_new = (_PVFV *) DecodePointer(__onexitbegin); What am I doing wrong?
processor_processid_map[128] = { 0L };invokes undefined behavior by writing past the bounds of the array