I have developed a C based server program to run inside the Thales Nshield solo HSM. Inside the program I have queu, thread pool and some other data structures developed by my self.
After program starts multiple clients can connect to the server and perform transactions. But after 2-3 days server will crash and program will prints the DSI exception vector. It is hard to find-out the correct error.
Thank you for the reply. The code is very big. If there is a way to handle these kind of exceptions or is there a way to debug the code easily please tel me.
How can we handle DSI exceptions programmatically?
I don't think that it is possible. It is a CPU exception which ends the program immediately.
How can I solve this?
Well, you read or write memory that you are not supposed to read or write. Check whether there are uninitialized variables (and initialize them).
Maybe at one point you allocate to much memory.
With raw pointer you have a lot of possible hard to detect errors like double free, access memory that is already freed, shallow copy, etc. Use smart pointer instead.
There's also the index out of bounds error. And more.