Unix questions - SIGSEGV ?

This is Interesting: Free IT Magazines  
Home > Archive > Unix questions > December 2005 > SIGSEGV ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SIGSEGV ?
friend.05@gmail.com

2005-12-16, 8:50 pm

In my program I am getting following error. what kind of error is this
and how can I debug it.


Program received signal SIGSEGV, Segmentation fault.
0xff31f69c in time () from /usr/lib/libc.so.1

Barry Margolin

2005-12-17, 2:48 am

In article <1134785590.144935.212950@z14g2000cwz.googlegroups.com>,
"friend.05@gmail.com" <hirenshah.05@gmail.com> wrote:

> In my program I am getting following error. what kind of error is this
> and how can I debug it.
>
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xff31f69c in time () from /usr/lib/libc.so.1


It's a segmentation violation, which means that the program tried to
access memory that was not assigned to it, or attempted to write to
memory marked read-only. It usually comes from indirecting through
uninitialized pointer variables, or from using a string literal in a
place that requires a modifiable string.

You can debug it by running your program under a debugger. You'll then
see which call to time() had the problem, and you should be able to
figure out why the time_t* parameter isn't set properly (probably
because you forgot to call malloc()).

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com