On 2009-08-03 22:21-0400 Hezekiah M. Carty wrote:

> Commit 10206 adds custom axis label support (the function
> plslabelfunc, C only for now) to PLplot trunk.  Commit 10207 updates
> example 19 (also C only for now) to use plslabelfunc for specialized
> longitude and latitude axis labels.

Hi Hez:

ctest shows an example 19 segfault now.  Further investigation with valgrind
gives the following results:

softw...@raven> valgrind examples/c/x19c -dev psc -o test.ps
==14737== Memcheck, a memory error detector.
==14737== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==14737== Using LibVEX rev 1854, a library for dynamic binary translation.
==14737== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==14737== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==14737== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==14737== For more details, rerun with: -v
==14737== 
==14737== Conditional jump or move depends on uninitialised value(s)
==14737==    at 0x6282107: (within /lib/libc-2.7.so)
==14737==    by 0x6275DBA: vsprintf (in /lib/libc-2.7.so)
==14737==    by 0x625CDD7: sprintf (in /lib/libc-2.7.so)
==14737==    by 0x400F95: geolocation_labeler (x19c.c:85)
==14737==    by 0x4E39815: plform (plbox.c:1407)
==14737==    by 0x4E38E89: label_box (plbox.c:1261)
==14737==    by 0x4E34A09: c_plaxes (plbox.c:462)
==14737==    by 0x4E32AA0: c_plbox (plbox.c:81)
==14737==    by 0x4E6D4C5: c_plenvi (plvpor.c:277)
==14737==    by 0x4E6C7C9: c_plenv (plvpor.c:94)
==14737==    by 0x40104D: main (x19c.c:122)
==14737== 
==14737== Conditional jump or move depends on uninitialised value(s)
==14737==    at 0x625956E: __printf_fp (in /lib/libc-2.7.so)
==14737==    by 0x6254F72: vfprintf (in /lib/libc-2.7.so)
==14737==    by 0x6275DC8: vsprintf (in /lib/libc-2.7.so)
==14737==    by 0x625CDD7: sprintf (in /lib/libc-2.7.so)
==14737==    by 0x400F95: geolocation_labeler (x19c.c:85)
==14737==    by 0x4E39815: plform (plbox.c:1407)
==14737==    by 0x4E38E89: label_box (plbox.c:1261)
==14737==    by 0x4E34A09: c_plaxes (plbox.c:462)
==14737==    by 0x4E32AA0: c_plbox (plbox.c:81)
==14737==    by 0x4E6D4C5: c_plenvi (plvpor.c:277)
==14737==    by 0x4E6C7C9: c_plenv (plvpor.c:94)
==14737==    by 0x40104D: main (x19c.c:122)
==14737== 
==14737== Use of uninitialised value of size 8
==14737==    at 0x6259538: __printf_fp (in /lib/libc-2.7.so)
==14737==    by 0x6254F72: vfprintf (in /lib/libc-2.7.so)
==14737==    by 0x6275DC8: vsprintf (in /lib/libc-2.7.so)
==14737==    by 0x625CDD7: sprintf (in /lib/libc-2.7.so)
==14737==    by 0x400F95: geolocation_labeler (x19c.c:85)
==14737==    by 0x4E39815: plform (plbox.c:1407)
==14737==    by 0x4E38E89: label_box (plbox.c:1261)
==14737==    by 0x4E34A09: c_plaxes (plbox.c:462)
==14737==    by 0x4E32AA0: c_plbox (plbox.c:81)
==14737==    by 0x4E6D4C5: c_plenvi (plvpor.c:277)
==14737==    by 0x4E6C7C9: c_plenv (plvpor.c:94)
==14737==    by 0x40104D: main (x19c.c:122)
==14737== 
==14737== Invalid write of size 1
==14737==    at 0x6259538: __printf_fp (in /lib/libc-2.7.so)
==14737==    by 0x6254F72: vfprintf (in /lib/libc-2.7.so)
==14737==    by 0x6275DC8: vsprintf (in /lib/libc-2.7.so)
==14737==    by 0x625CDD7: sprintf (in /lib/libc-2.7.so)
==14737==    by 0x400F95: geolocation_labeler (x19c.c:85)
==14737==    by 0x4E39815: plform (plbox.c:1407)
==14737==    by 0x4E38E89: label_box (plbox.c:1261)
==14737==    by 0x4E34A09: c_plaxes (plbox.c:462)
==14737==    by 0x4E32AA0: c_plbox (plbox.c:81)
==14737==    by 0x4E6D4C5: c_plenvi (plvpor.c:277)
==14737==    by 0x4E6C7C9: c_plenv (plvpor.c:94)
==14737==    by 0x40104D: main (x19c.c:122)
==14737==  Address 0x408130075f6fd220 is not stack'd, malloc'd or (recently)
free'd
==14737== 
==14737== Process terminating with default action of signal 11 (SIGSEGV)
==14737==  General Protection Fault
==14737==    at 0x6259538: __printf_fp (in /lib/libc-2.7.so)
==14737==    by 0x6254F72: vfprintf (in /lib/libc-2.7.so)
==14737==    by 0x6275DC8: vsprintf (in /lib/libc-2.7.so)
==14737==    by 0x625CDD7: sprintf (in /lib/libc-2.7.so)
==14737==    by 0x400F95: geolocation_labeler (x19c.c:85)
==14737==    by 0x4E39815: plform (plbox.c:1407)
==14737==    by 0x4E38E89: label_box (plbox.c:1261)
==14737==    by 0x4E34A09: c_plaxes (plbox.c:462)
==14737==    by 0x4E32AA0: c_plbox (plbox.c:81)
==14737==    by 0x4E6D4C5: c_plenvi (plvpor.c:277)
==14737==    by 0x4E6C7C9: c_plenv (plvpor.c:94)
==14737==    by 0x40104D: main (x19c.c:122)
==14737== 
==14737== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 13 from 2)
==14737== malloc/free: in use at exit: 70,855 bytes in 226 blocks.
==14737== malloc/free: 257 allocs, 31 frees, 85,836 bytes allocated.
==14737== For counts of detected errors, rerun with: -v
==14737== searching for pointers to 226 not-freed blocks.
==14737== checked 282,608 bytes.
==14737== 
==14737== LEAK SUMMARY:
==14737==    definitely lost: 0 bytes in 0 blocks.
==14737==      possibly lost: 0 bytes in 0 blocks.
==14737==    still reachable: 70,855 bytes in 226 blocks.
==14737==         suppressed: 0 bytes in 0 blocks.
==14737== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault

I have 64-bit hardware and Debian stable. Furthermore, I ran cmake-2.6.4
with a clean source tree and initially empty build tree with CC defined as
follows:

gcc -g -fvisibility=hidden

Hope these details help you to verify and fix this bug.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to