Hello, Here is a patchlet that needs to be reviewed. It fixes a bug in the function 'discardGraph' (src/graph/viewman/makeGraph.c). This bug is triggered when closing a view2D window [see the end of this email].
@@ -144,7 +144,7 @@ for (j=0, pL=theGraph->listOfListsOfPoints; j<theGraph->numberOfLists; j++,pL++) free(pL->listOfPoints); - free(pL); + free(theGraph->listOfListsOfPoints); free(theGraph); } Nothing more to say than it uses the correct pointer to free the array. See the beginning of src/graph/viewman/makeGraph.c for the memory allocation and src/graph/include/view2D.h for the structure declarations. Greg ===================================================================== 1-> draw(sin(x),x=-%pi..%pi) close the 2D graphic window => *** glibc detected *** /usr/local/FriCAS/target/x86_64-unknown-linux/lib/viewman: munmap_chunk(): invalid pointer: 0x000000000060b0d0 *** ======= Backtrace: ========= /lib/libc.so.6(cfree+0x1b6)[0x2b0346291d06] /usr/local/FriCAS/target/x86_64-unknown-linux/lib/viewman[0x40334e] /usr/local/FriCAS/target/x86_64-unknown-linux/lib/viewman[0x401786] /usr/local/FriCAS/target/x86_64-unknown-linux/lib/viewman[0x4017d8] /usr/local/FriCAS/target/x86_64-unknown-linux/lib/viewman[0x4039b9] /lib/libc.so.6(__libc_start_main+0xf4)[0x2b03462381c4] /usr/local/FriCAS/target/x86_64-unknown-linux/lib/viewman[0x401579] ======= Memory map: ======== 00400000-00409000 r-xp 00000000 08:06 607870 /usr/local/FriCAS/target/x86_64-unknown-linux/lib/viewman 00608000-00609000 rw-p 00008000 08:06 607870 /usr/local/FriCAS/target/x86_64-unknown-linux/lib/viewman 00609000-0062c000 rw-p 00609000 00:00 0 [heap] 2b03455bb000-2b03455d8000 r-xp 00000000 08:06 4693820 /lib/ld-2.7.so 2b03455d8000-2b03455db000 rw-p 2b03455d8000 00:00 0 2b03457d7000-2b03457d9000 rw-p 0001c000 08:06 4693820 /lib/ld-2.7.so 2b03457d9000-2b03457db000 r-xp 00000000 08:06 4693818 /lib/libutil-2.7.so 2b03457db000-2b03459da000 ---p 00002000 08:06 4693818 /lib/libutil-2.7.so 2b03459da000-2b03459dc000 rw-p 00001000 08:06 4693818 /lib/libutil-2.7.so 2b03459dc000-2b03459ec000 r-xp 00000000 08:06 528342 /usr/lib/libXpm.so.4.11.0 2b03459ec000-2b0345bec000 ---p 00010000 08:06 528342 /usr/lib/libXpm.so.4.11.0 2b0345bec000-2b0345bed000 rw-p 00010000 08:06 528342 /usr/lib/libXpm.so.4.11.0 2b0345bed000-2b0345bf5000 r-xp 00000000 08:06 524156 /usr/lib/libSM.so.6.0.0 2b0345bf5000-2b0345df4000 ---p 00008000 08:06 524156 /usr/lib/libSM.so.6.0.0 2b0345df4000-2b0345df5000 rw-p 00007000 08:06 524156 /usr/lib/libSM.so.6.0.0 2b0345df5000-2b0345e0b000 r-xp 00000000 08:06 524100 /usr/lib/libICE.so.6.3.0 2b0345e0b000-2b034600b000 ---p 00016000 08:06 524100 /usr/lib/libICE.so.6.3.0 2b034600b000-2b034600c000 rw-p 00016000 08:06 524100 /usr/lib/libICE.so.6.3.0 2b034600c000-2b0346011000 rw-p 2b034600c000 00:00 0 2b0346011000-2b0346113000 r-xp 00000000 08:06 524535 /usr/lib/libX11.so.6.2.0 2b0346113000-2b0346213000 ---p 00102000 08:06 524535 /usr/lib/libX11.so.6.2.0 2b0346213000-2b034621a000 rw-p 00102000 08:06 524535 /usr/lib/libX11.so.6.2.0 2b034621a000-2b034636e000 r-xp 00000000 08:06 4693798 /lib/libc-2.7.so 2b034636e000-2b034656e000 ---p 00154000 08:06 4693798 /lib/libc-2.7.so 2b034656e000-2b0346571000 r--p 00154000 08:06 4693798 /lib/libc-2.7.so 2b0346571000-2b0346573000 rw-p 00157000 08:06 4693798 /lib/libc-2.7.so 2b0346573000-2b0346578000 rw-p 2b0346573000 00:00 0 2b0346578000-2b034657a000 r-xp 00000000 08:06 527433 /usr/lib/libXau.so.6.0.0 2b034657a000-2b0346679000 ---p 00002000 08:06 527433 /usr/lib/libXau.so.6.0.0 2b0346679000-2b034667a000 rw-p 00001000 08:06 527433 /usr/lib/libXau.so.6.0.0 2b034667a000-2b034667b000 rw-p 2b034667a000 00:00 0 2b034667b000-2b0346680000 r-xp 00000000 08:06 527018 /usr/lib/libXdmcp.so.6.0.0 2b0346680000-2b034677f000 ---p 00005000 08:06 527018 /usr/lib/libXdmcp.so.6.0.0 2b034677f000-2b0346780000 rw-p 00004000 08:06 527018 /usr/lib/libXdmcp.so.6.0.0 2b0346780000-2b0346782000 r-xp 00000000 08:06 4693806 /lib/libdl-2.7.so 2b0346782000-2b0346982000 ---p 00002000 08:06 4693806 /lib/libdl-2.7.so 2b0346982000-2b0346984000 rw-p 00002000 08:06 4693806 /lib/libdl-2.7.so _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer