Re: Help: Segmentation fault



On 12月16日, 上午12时20分, Paul Pluzhnikov <ppluzhnikov-...@xxxxxxxxx>
wrote:
Allen <Allen.Che...@xxxxxxxxx> writes:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212356912 (LWP 9639)]
0xb7c34c92 in ptmalloc_init () from /lib/libc.so.6
(gdb)

Here are some gdb commands that you should have executed:

where
info shared

Also, knowing how you linked 'agent' may provide clues.

Finally, any crash inside malloc (which is what appears to be
happening here) is with 99.9% probability a result of heap
corruption. Run your app under Valgrind; it will likely tell you
exactly where your problem is.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

Thank you Paul!

I will detect the bug using Valgrind. Because the crash occurs at the
calling function coded by another person provided with a shared
library, I am really doubted he compiled the error version for me.

The most strange thing is that I can compile the source code and then
run it under Eclipse IDE, but can not run in the terminal.
I really wonder why.

Thank you again.
.



Relevant Pages

  • Re: Help: Segmentation fault
    ... In order to understand recursion you must first understand recursion. ... I will detect the bug using Valgrind. ... The most strange thing is that I can compile the source code and then ...
    (comp.os.linux.development.apps)
  • Re: Help: Segmentation fault
    ... Here are some gdb commands that you should have executed: ... knowing how you linked 'agent' may provide clues. ... Run your app under Valgrind; ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.apps)