Hello, just disregard this if it is the same as the other thread with a 
segfault and if it does not provide any more information.

I get a segfault I get when running the C-example no.1 with the "-save" 
option:

x01c -dev xwin -np -save 1.psc

If I comment out plend() in the example, it works fine. I'm using todays SVN 
version, built with debugging symbols. The examples are also built with 
debugging, but gdb gives me no output more than:

Program received signal SIGSEGV, Segmentation fault.
0xb7cdd33c in free () from /lib/i686/cmov/libc.so.6

Valgrind gives lots of output, but it is the last one that seems most 
interesting:

==32061== Invalid free() / delete / delete[]
==32061==    at 0x402465C: free (vg_replace_malloc.c:323)
==32061==    by 0x40417EF: c_plend1 (plcore.c:1823)
==32061==    by 0x40411FB: c_plend (plcore.c:1759)
==32061==    by 0x804904D: main (x01c.c:210)
==32061==  Address 0x430d4f8 is 0 bytes inside a block of size 131,072 free'd
==32061==    at 0x402465C: free (vg_replace_malloc.c:323)
==32061==    by 0x40417EF: c_plend1 (plcore.c:1823)
==32061==    by 0x8048F3B: main (x01c.c:184)

There seems to be some problem with freeing memory. It looks like the error 
message in sec.4.3.4 in the valgrind manual, here:

http://valgrind.org/docs/manual/mc-manual.html#mc-manual.errormsgs

>From what I can understand (which may be wrong) it is related to freeing the 
memory for plsc->plbuf_buffer, but after looking through the code I think it 
will be too complicated for me to track down the error.

Best regards,
Torquil Sørensen

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to