Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

ASSERTIONS

dajum
Novice
511 Views

I was debugging my code when it seems it hit an ASSERT in some lower level routine. The command prompt came back after listing the error message but the run seems to be stopped. None of the toolbar icons are available ( go, current line, restart, etc). The only thing I found to do was issue a kill command to IDB. Not sure why it hit an ASSERT, but the code seems to run fine long past there outside of the debugger. But is KILL the only thing to do in that case?

0 Kudos
3 Replies
Ron_Green
Moderator
511 Views
that sounds like a bug in the interface between the GUI and the idb engine. When the GUI gets to that state, I don't know of any recovery.

IF this is reproducible, and If the executable can be attached along with any input files needed, with instructions on how to reproduce, we could get a bug report started. I don't think we'd need the sources unless the assertion occurs after a break and when you attempt to print variable values.

another question: did you unlimit stack with 'ulimit -s unlimited' prior to starting the debug session? that could possibly cause what you describe.

ron
0 Kudos
dajum
Novice
511 Views
I can reproduce it, but I can't send it to you in the current form since the executable is locked to my machine. Getting it unlocked would take some effort, and I'm not sure the problem would still be there. SO I think I'll pass for now on submitting this unless I can't debug the program failure another way.

I'm a very novice linux user, no idea what unlimiting the stack means or where you would even issue that command. So I didn't do that :)

Thanks

Dave
0 Kudos
jimdempseyatthecove
Honored Contributor III
511 Views
Asserts are generally inserted into code at points where you check the validity of arguments or (required) return values from system calls (such as memory allocation errors). It is good programming practice to include something in the assert message that might lead you to what the objection was. Line number would not be helpful with 3rd party library and no source. Often the assert message will contain the text of the statement causing the assertion. What was the text displayed in the consol window (and/or stderr)

Jim Dempsey
0 Kudos
Reply