Re: Segmentation fault need help

From: Måns Rullgård (mru_at_kth.se)
Date: 02/16/04


Date: Mon, 16 Feb 2004 00:38:35 +0100


"Marcia Hon" <honm@rogers.com> writes:

> Hi,
>
> I am trying to run a program except I get the following segmentation fault.
> I don't know how to solve it. Please if you know could you please help.
>
> Thanks, Marcia
>
> Program received signal SIGSEGV, Segmentation fault.
>
> 0x0a6e6962 in ?? ()
>
> (gdb) bt
>
> #0 0x0a6e6962 in ?? ()
>
> Cannot access memory at address 0xa6d6461

You have a corrupted stack. Look for buffer overflows in
automatically allocated memory. Another typical cause is freeing
automatic memory. It could also be caused by using an uninitialized
pointer. A memory debugger like Electric Fence or (for PC) valgrind
is useful for finding such bugs.

-- 
Måns Rullgård
mru@kth.se


Relevant Pages

  • Re: Segmentation fault need help
    ... "Marcia Hon" writes: ... > I am trying to run a program except I get the following segmentation fault. ... automatically allocated memory. ...
    (comp.lang.c)
  • Re: Segmentation fault need help
    ... "Marcia Hon" writes: ... > I am trying to run a program except I get the following segmentation fault. ... automatically allocated memory. ...
    (comp.unix.programmer)
  • Re: SIGSEGV in getdir()
    ... the 'filelist' argument isn't a pointer to memory obtailed ...    from mallocor realloc(or points to memory already ... printfor mallocetc. fail with a segmentation fault ... receiving a layer 7 acknowledge upon delivery of string. ...
    (comp.unix.programmer)
  • Re: SIGSEGV in getdir()
    ... To me it's not totally obvious that the segmentation fault ... Error reallocating memory in filelist ... Error allocating memory for filename ...
    (comp.unix.programmer)
  • Re: SIGSEGV in getdir()
    ... the 'filelist' argument isn't a pointer to memory obtailed ... printfor mallocetc. fail with a segmentation fault ... use a memory debugger like valgrind. ... If you want to know exactly where in the program the SEGFAULT ...
    (comp.unix.programmer)