On Tue, 23 Nov 2004, Danny Backx wrote:

There is indeed a bug in the release in that area; xpdf is known to
crash with it.

I thought I had the problem figured out but then this turned up.

According to valgrind, the source of the crash appears to be the call


XmFontListFree(o);

on line 686 of Label.c. If I comment this out xpdf runs OK. Valgrind reports a small amount of leaked memory with libXm thus modified; I'm attaching the trace.

Allin Cottrell
==25961== Memcheck, a memory error detector for x86-linux.
==25961== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==25961== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==25961== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==25961== For more details, rerun with: -v
==25961== 
==25961== Source and destination overlap in memcpy(0x1BFBCEA0, 0x1BFBCEA0, 4)
==25961==    at 0x1B905B86: memcpy (mac_replace_strmem.c:113)
==25961==    by 0x1BB7002A: GetResources (in /usr/X11R6/lib/libXt.so.6.0)
==25961==    by 0x1BB708B4: _XtGetResources (in /usr/X11R6/lib/libXt.so.6.0)
==25961==    by 0x1BB5932A: xtCreate (in /usr/X11R6/lib/libXt.so.6.0)
==25961== 
==25961== ERROR SUMMARY: 270 errors from 1 contexts (suppressed: 431 from 2)
==25961== malloc/free: in use at exit: 262547 bytes in 3559 blocks.
==25961== malloc/free: 28263 allocs, 24704 frees, 1018181 bytes allocated.
==25961== For counts of detected errors, rerun with: -v
==25961== searching for pointers to 3559 not-freed blocks.
==25961== checked 7701840 bytes.
==25961== 
==25961== 
==25961== 17 bytes in 1 blocks are definitely lost in loss record 16 of 103
==25961==    at 0x1B905E6D: malloc (vg_replace_malloc.c:131)
==25961==    by 0x1BC03176: XGetWindowProperty (in /usr/X11R6/lib/libX11.so.6.2)
==25961==    by 0x1BA383D1: read_atoms_table (DragBS.c:811)
==25961==    by 0x1BA39391: _XmInitTargetsTable (DragBS.c:1384)
==25961== 
==25961== 
==25961== 28 bytes in 1 blocks are definitely lost in loss record 25 of 103
==25961==    at 0x1B906864: calloc (vg_replace_malloc.c:176)
==25961==    by 0x1BB503E6: XtCalloc (in /usr/X11R6/lib/libXt.so.6.0)
==25961==    by 0x1BA23143: _XmTransformSubResources (BaseClass.c:1904)
==25961==    by 0x1BAF3935: class_initialize (Vendor.c:668)
==25961== 
==25961== 
==25961== 40 bytes in 1 blocks are possibly lost in loss record 34 of 103
==25961==    at 0x1B905E6D: malloc (vg_replace_malloc.c:131)
==25961==    by 0x1BB5030A: XtMalloc (in /usr/X11R6/lib/libXt.so.6.0)
==25961==    by 0x1BA5114C: XmFontListEntryLoad (FontList.c:508)
==25961==    by 0x1BAF9A6E: __XmFontListResourceAddEntry (ResConvert.c:1807)
==25961== 
==25961== 
==25961== 3166 bytes in 82 blocks are definitely lost in loss record 94 of 103
==25961==    at 0x1B905E6D: malloc (vg_replace_malloc.c:131)
==25961==    by 0x1BB5030A: XtMalloc (in /usr/X11R6/lib/libXt.so.6.0)
==25961==    by 0x1BAE116F: VirtKeysInitialize (VirtKeys.c:1140)
==25961==    by 0x1BAE1482: _XmVirtKeysInitialize (VirtKeys.c:1233)
==25961== 
==25961== LEAK SUMMARY:
==25961==    definitely lost: 3211 bytes in 84 blocks.
==25961==    possibly lost:   40 bytes in 1 blocks.
==25961==    still reachable: 259296 bytes in 3474 blocks.
==25961==         suppressed: 0 bytes in 0 blocks.
==25961== Reachable blocks (those to which a pointer was found) are not shown.
==25961== To see them, rerun with: --show-reachable=yes

Reply via email to