Go to Post Curse you and your logic! - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 23-10-2013, 20:44
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
VxWorks exception handling and division by zero

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++?
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi