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 0x00000000029EAA3BI 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?
链接已复制
3 回复数
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.
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.
