From: Torquil M. <to...@gm...> - 2008-02-01 14:27:28
|
Hello, just disregard this if it is the same as the other thread with a=20 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"=20 option: x01c -dev xwin -np -save 1.psc If I comment out plend() in the example, it works fine. I'm using todays SV= N=20 version, built with debugging symbols. The examples are also built with=20 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=20 interesting: =3D=3D32061=3D=3D Invalid free() / delete / delete[] =3D=3D32061=3D=3D at 0x402465C: free (vg_replace_malloc.c:323) =3D=3D32061=3D=3D by 0x40417EF: c_plend1 (plcore.c:1823) =3D=3D32061=3D=3D by 0x40411FB: c_plend (plcore.c:1759) =3D=3D32061=3D=3D by 0x804904D: main (x01c.c:210) =3D=3D32061=3D=3D Address 0x430d4f8 is 0 bytes inside a block of size 131,= 072 free'd =3D=3D32061=3D=3D at 0x402465C: free (vg_replace_malloc.c:323) =3D=3D32061=3D=3D by 0x40417EF: c_plend1 (plcore.c:1823) =3D=3D32061=3D=3D by 0x8048F3B: main (x01c.c:184) There seems to be some problem with freeing memory. It looks like the error= =20 message in sec.4.3.4 in the valgrind manual, here: http://valgrind.org/docs/manual/mc-manual.html#mc-manual.errormsgs =46rom what I can understand (which may be wrong) it is related to freeing = the=20 memory for plsc->plbuf_buffer, but after looking through the code I think i= t=20 will be too complicated for me to track down the error. Best regards, Torquil S=F8rensen |