Let's say we have an SDK in C ++ that takes some binary data (like an image) and does something. Is it not possible to make this SDK "crash"? As a result of the accident, I primarily mean the forced termination of the OS in case of violation of access to memory due to invalid input transmitted by the user (for example, abnormally short unwanted data).
I have no experience with C ++, but when I googled, I found several ways that sounded like a solution (use a vector instead of an array, configure the compiler to do an automatic border check, etc.).
When I introduced this to the developer, he said it was still not possible. Not that I don't believe him, but if so, how does this language, like Java, handle this? I thought the JVM performs border checks every time. If so, why can't you do the same thing in C ++ manually?
UPDATE
By "Crash proof" I do not mean that the application does not end. I mean that it should not suddenly stop without information about what happened (I mean that it will unload the kernel, etc., but it does not seem possible to display a message like "Argument x is invalid" and etc.?)
source
share