I've been wondering how VxWorks on the cRIO reacts to uncaught exceptions in the user program. As I understand it, the user program is loaded as a kernel module, so it seems like an uncaught exception should result in a kernel panic. I wanted to test this out, so I wrote code that I expected to throw a runtime error on a button press. I tried a piece of code that would simply output the result of "1/0" to stderr. The result, however, was that "0" was printed to stderr, and no error or unexpected behavior occurred. The same code snippet,
Code:
std::cerr << 1/0 << std::endl;
in a native program caused a crash. So now I am left with two questions:
How does VxWorks respond to an uncaught exception in a kernel module?
Why is the result of "1/0" "0" in WindRiver C++?