PDA

View Full Version : segmentation fault



Milenkonslisboa
July 17th, 2010, 05:13 PM
I got this,do not know how to solve it.One friend mentioned me it could be that programs try to acsess memory not alocated to it.What should I do?

vikas.sood
July 17th, 2010, 05:23 PM
I got this,do not know how to solve it.One friend mentioned me it could be that programs try to acsess memory not alocated to it.What should I do?

Programs can crash for many reasons. segmentation fault means your application tried to access memory which it is not allowed to. SIGSEGV is raised to such application which when cause access violation.

What exactly are trying to do?? Is it that you working on some application and it crashes abruptly and you are unable to debug?

era86
July 17th, 2010, 06:07 PM
I got this,do not know how to solve it.One friend mentioned me it could be that programs try to acsess memory not alocated to it.What should I do?

Check your pointers. We can only give descriptive answers with descriptive questions. Help us help you!
:popcorn:

Milenkonslisboa
July 17th, 2010, 07:17 PM
I have a fortran code,try to run executable.So I have to debugg it from scratsh probably.

Milenkonslisboa
July 18th, 2010, 02:04 PM
Image PC Routine Line Source
eik 0000000000408367 Unknown Unknown Unknown
eik 000000000040527C Unknown Unknown Unknown
eik 000000000040311C Unknown Unknown Unknown
libc.so.6 00007FEB154B45A6 Unknown Unknown Unknown
eik 0000000000403019 Unknown Unknown Unknown
Anyone knows what do these PC values tells me?

Zugzwang
July 18th, 2010, 05:43 PM
Try to tell your compiler to include debugging information. The PC values on its own are useless. The debugger will then tell you in which function/method the problem happened.

nvteighen
July 18th, 2010, 06:24 PM
Try to tell your compiler to include debugging information. The PC values on its own are useless. The debugger will then tell you in which function/method the problem happened.

Doesn't gfortran -g do that?

Milenkonslisboa
July 18th, 2010, 07:50 PM
Actually my compiler is Intel11.1 Linux,it also offers debugging option.