in free(): error: junk pointer, too high to make sense Segmentation fault: 11 (core dumped) gprof

Posted by Mayank on Stack Overflow See other posts from Stack Overflow or by Mayank
Published on 2010-04-01T12:59:24Z Indexed on 2010/04/01 13:13 UTC
Read the original article Hit count: 385

Filed under:
|
|

I am trying to profile my application. For this I compiled my code with -pg and -lc_p option, it compiled successfully

During run time I am getting the following error. in free(): error: junk pointer, too high to make sense Segmentation fault: 11 (core dumped)

Doing GDB gives error as.

(gdb) b main
Breakpoint 1 at 0x5124d4:
(gdb) r
warning: Unable to get location for thread creation breakpoint: generic error
[New LWP 100085]
cacheIp in free(): error: junk pointer, too high to make sense

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 100085]
0x00000000006c3a1f in pthread_sigmask ()

My application is multi threaded and is a combination of C and C++ code.

uname -a
FreeBSD 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 01:43:02 UTC 2008    [email protected]:/usr/obj/usr/src/sys/SMP amd64

Why is the code crashing. Am I missing something.

© Stack Overflow or respective owner

Related posts about c++

Related posts about profiling