This is more of a tale of "I think I broke it". Basically as an assignment for CS I have to write an assembler for a subset of the MIPS assembly language. Currently it is not working, getting a sigseg, so I decided to debug the code and step through it line by line. Every time I reach line 65 I get these messages from Code::Blocks:
At D:\C++\MIPSAssemblerCS241\asm.cc:65
Program received signal SIGSEGV, Segmentation fault.
On top of that I get little pop-up windows in the corners warning me about the very same segmentation fault.
As such I naturally inspected line 65 of my code. This is a copy-paste of it:
size_t index=0;//we are at the 0th instruction
I am fairly certain that such a line can in no way cause a segmentation fault, and my code uses no multithreading, so have I broken my debugger somehow? or is there really a type of segmentation fault that can occur at such a line?