|
From: Alan W. I. <ir...@be...> - 2002-10-15 21:43:58
|
I have just been checking Joao's recent change using valgrind. The only *PLplot* memory management problem that it finds now is ==9658== Use of uninitialised value of size 8 ==9658== at 0x4025DECC: plP_draw3d (plot3d.c:1451) ==9658== by 0x4025DD7A: plnxtvhi_draw (plot3d.c:1400) ==9658== by 0x4025D968: plnxtvhi (plot3d.c:1244) ==9822== by 0x4025D7D9: plnxtv (plot3d.c:1174) ==9822== by 0x4025C40E: plt3zz (plot3d.c:947) ==9822== by 0x4025BAFC: c_plot3d (plot3d.c:729) ==9822== by 0x40259611: c_plmesh (plot3d.c:100) ==9822== by 0x8049046: main (x08c.c:176) Line 1451 of plot3d.c is if (c != NULL && c[--j] >= 0. && c[j] <= 1.) Under gdb for some reason I cannot print out c or j for the plP_draw3d stack frame, but if I use "up" to get to the plnxtvhi_draw stack frame j is 37 and c has reasonable values in it up c[35]. However, c[36] is 0. strongly suggesting that may be the uninitialized value that is causing the valgrind warning. Can you have a further look at this, Joao, to see why that c value is uninitialized? There continue to be large diffs between the postscript files produced by ./x08c -dev psc -o x08c.ps ../test/test_single_tcl.sh 08 ../test/test_single_python.sh 08 Note the uninitialized value could be anything for the various front ends and indeed could change depending on the history of the memory that is malloced for c. Thus, my working hypothesis is this uninitialized value is the source of the C, tcl, and python example 8 differences. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |