This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with XPDF on Cygwin with recent snapshots (newlib ?)


Brian Dessent wrote:

> I'll build xpdf and lesstif with debug symbols and continue.

It doesn't really become any more clear, unfortunately.

Program received signal SIGSEGV, Segmentation fault.
_LTAddPixmapToCache (pixmap_name=0x22c870 "--anon pixmap \"",
    pixmap=8388732, screen=0x1006bc18, foreground=1, background=1,
    depth=24, width=0, height=15, hot_x=1, hot_y=1)
    at /usr/src/lesstif-0.94.4/lib/Xm-2.1/ImageCache.c:1039
1039            XtFree((char *)OldPixmapDesc->image_name);

(gdb) bt
#0  _LTAddPixmapToCache (pixmap_name=0x22c870 "--anon pixmap \"",
    pixmap=8388732, screen=0x1006bc18, foreground=1, background=1,
    depth=24, width=0, height=15, hot_x=1, hot_y=1)
    at /usr/src/lesstif-0.94.4/lib/Xm-2.1/ImageCache.c:1039
#1  0x6b14d4ab in _XmInstallPixmap (pixmap=1, screen=0x1,
    image_name=0x1 <Address 0x1 out of bounds>, foreground=1,
    background=1)
    at /usr/src/lesstif-0.94.4/lib/Xm-2.1/ImageCache.c:604
#2  0x6b14f7fb in expose (w=0x100878a0, event=0x22cbd0,
    region=0x1006beb8)
    at /usr/src/lesstif-0.94.4/lib/Xm-2.1/Label.c:1274
#3  0x66c2e5fc in cygXt-6!_XtEventInitialize ()
   from /usr/X11R6/bin/cygXt-6.dll
#4  0x66c2ec7c in cygXt-6!XtDispatchEventToWidget ()
   from /usr/X11R6/bin/cygXt-6.dll
#5  0x66c2f057 in cygXt-6!_XtOnGrabList ()
   from /usr/X11R6/bin/cygXt-6.dll
#6  0x66c2f368 in cygXt-6!XtDispatchEvent ()
   from /usr/X11R6/bin/cygXt-6.dll
#7  0x66c2f794 in cygXt-6!XtAppMainLoop ()
   from /usr/X11R6/bin/cygXt-6.dll
#8  0x004a8df8 in fhandler_pipe::get_guard ()
#9  0x1005e588 in ?? ()
#10 0x1005e578 in ?? ()
#11 0x00000001 in ?? ()
#12 0x00000000 in ?? ()

(gdb) l
1029        /*
1030         * If there's already such an entry in the cache, then we'll
silently
1031         * overwrite it (compatibility with _XmInstallPixmap()).
Sigh.
1032         */
1033        if (_LTHashTableReplaceItemAndID(PixmapCache,
1034                                        (LTHashItemID) PixmapDesc,
1035                                        (LTHashItemValue)
PixmapDesc,
1036                                        (LTHashItemID *)
OldPixmapDesc,
1037                                        NULL))
1038        {
1039            XtFree((char *)OldPixmapDesc->image_name);
1040            XtFree((char *)OldPixmapDesc);
1041        }
1042
1043        _LTHashTableReplaceItem(RevPixmapCache, (LTHashItemID)
PixmapDesc,
1044                               (LTHashItemValue) PixmapDesc, NULL);
1045
1046        return True;
1047    }
1048

(gdb) p OldPixmapDesc
No symbol "OldPixmapDesc" in current context.

(gdb) i sc 1039
Scope for 1039:
Symbol pixmap_name is a variable with complex or multiple locations
(DWARF2), length 4.
Symbol pixmap is a variable with complex or multiple locations (DWARF2),
length 4.
Symbol screen is a variable with complex or multiple locations (DWARF2),
length 4.
Symbol foreground is a variable in register eax, length 4.
Symbol background is a variable in register eax, length 4.
Symbol depth is a variable with complex or multiple locations (DWARF2),
length 4.
Symbol width is a variable in register edi, length 4.
Symbol height is a variable in register esi, length 4.
Symbol hot_x is a variable in register eax, length 4.
Symbol hot_y is a variable in register eax, length 4.
Symbol RootWindow is a variable with complex or multiple locations
(DWARF2), length 4.
Symbol x is a variable with complex or multiple locations (DWARF2),
length 4.
Symbol y is a variable with complex or multiple locations (DWARF2),
length 4.
Symbol w is a variable with complex or multiple locations (DWARF2),
length 4.
Symbol h is a variable with complex or multiple locations (DWARF2),
length 4.
Symbol bw is a variable with complex or multiple locations (DWARF2),
length 4.
Symbol d is a variable with complex or multiple locations (DWARF2),
length 4.
Symbol PixmapDesc is a variable in register ebx, length 4.

(gdb) i line 1039
Line 1039 of "/usr/src/lesstif-0.94.4/lib/Xm-2.1/ImageCache.c"
   starts at address 0x6b14d441 <_LTAddPixmapToCache+369>
   and ends at 0x6b14d44e <_LTAddPixmapToCache+382>.

(gdb) x/10i $pc
0x6b14d441 <_LTAddPixmapToCache+369>:   mov    0x0,%eax
0x6b14d446 <_LTAddPixmapToCache+374>:   mov    %eax,(%esp)
0x6b14d449 <_LTAddPixmapToCache+377>:   call   0x6b1cc080 <XtFree>
0x6b14d44e <_LTAddPixmapToCache+382>:   movl   $0x0,(%esp)
0x6b14d455 <_LTAddPixmapToCache+389>:   call   0x6b1cc080 <XtFree>
0x6b14d45a <_LTAddPixmapToCache+394>:
    jmp    0x6b14d3b5 <_LTAddPixmapToCache+229>
0x6b14d45f <_LTAddPixmapToCache+399>:   nop
0x6b14d460 <_XmInstallPixmap>:  push   %ebp
0x6b14d461 <_XmInstallPixmap+1>:        xor    %eax,%eax
0x6b14d463 <_XmInstallPixmap+3>:        mov    %esp,%ebp


So, OldPixmapDesc seems to be a bogus pointer, and and refererencing
->image_name causes a fault trying to read from 0x0.  Gdb doesn't seem
to know anything about this variable though, so it was probably
optimized away or a macro or something.  Anyone familiar with this code
that can make any sense of why this would happen?

I can't possibly see how this would be due to the changes in newlib, but
it is very possible that some completely unrelated part of the code
caused this as a cascading resulting failure.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]