Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
3 Views

for_emit_diagnostic in backtrace

When I debug some problem like a segfault in a fortran program, the first three frames in the backtrace (0-2) always point to some functions in the intel library libifcoremt.so and in the system library libpthread.so, and only in frame 3, the actual cause in my code is shown:
raise ()                      libpthread-2.12.so             0x0000003DE2A0F6AB
for__issue_diagnostic ()      libifcoremt.so.5               0x00002AFBB1E83348
for_emit_diagnostic ()	      libifcoremt.so.5               0x00002AFBB1E83913
somefunc (somepar=somevalue)  somefile.f90:1364	somebinary   0x00000000029EAA3B
I am not completely sure but I believe it has not always been like that, but I don't know what could have changed in my setup. Can someone help me figure out what is going on here, and whether there's a possibility to make _my_ relevant code become frame 0 again?
0 Kudos
3 Replies
Highlighted
3 Views

If you get a segfault, for

If you get a segfault, for_emit_diagnostic would not be involved. That would be for errors detected at run-time such as array bounds violation. It's possible that if the stack got corrupted that a segfault might occur WHILE the diagnostic was trying to be put out, but that's much less common.

Retired 12/31/2016
0 Kudos
Highlighted
3 Views

OK. So this means for array

OK. So this means for array bounds violations (also for using unassociated pointers?) I will always get these first three frames in the stack trace, and there's no way to suppress these? I'm asking because it makes the backtrace a tad more complicated than it would need to be as I'll always end up in some assembly code first and have to move three frames up before coming to the fortran code actually causing the problem.
0 Kudos
Highlighted
3 Views

Yes - any error that is

Yes - any error that is detected by tests in the code rather than the processor or OS. I don't know of a way to eliminate the intermediate frames.

Retired 12/31/2016
0 Kudos