[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#319822: xterm crash



On Fri, Aug 03, 2007 at 05:18:13PM +0400, Alexandra N. Kossovsky wrote:
> On Fri, Aug 03, 2007 at 08:03:14AM -0400, Thomas Dickey wrote:
> > On Fri, Aug 03, 2007 at 03:19:57PM +0400, Alexandra N. Kossovsky wrote:
> > > Breakpoint 1, xerror (d=0x55f450, ev=0x7fff950c4fb0) at ./misc.c:3279
> > > 3279    {
> > > (gdb) bt
> > > #0  xerror (d=0x55f450, ev=0x7fff950c4fb0) at ./misc.c:3279
> > > #1  0x00002b87164a806e in _XError (dpy=0x55f450, rep=<value optimized out>)
> > >     at ../../src/XlibInt.c:2888
> > > #2  0x00002b87164a9dbb in _XReply (dpy=0x55f450, rep=0x7fff950c5120, extra=0, 
> > >     discard=1) at ../../src/XlibInt.c:1817
> > > #3  0x00002b8716496c7b in XParseColor (dpy=0x55f450, cmap=32, spec=0x56d0e0 "blue", 
> > >     def=0x7fff950c5180) at ../../src/ParseCol.c:126
> > 
> > ...from here down (#3..#0) is in the X libraries.
> 
> I know. Do you need debug information from X libraries?

That's more work (unless you happen to have the debug-libraries available).
But compare spec in frames #3 and #4 - it's broken in #4 but not #3.
 
> > 
> > > #4  0x0000000000424007 in AllocateAnsiColor (xw=0x578970, res=0x57a800, 
> > >     spec=0x18b <Address 0x18b out of bounds>) at ./misc.c:1668
> > 
> > This is interesting, but the line-number doesn't match my source for #222.
> > That's from lines 1473 to 1508.
> 
> I've used source from 222-1etch2, which differ from 222.
> 
> > Either there's something wrong with the
> > line-numbering, or the parameter for spec is broken.  It would be simple
> > to add a printf in xterm at the beginning of this function to verify both:
> > 
> > 	fprintf(stderr, "AllocateAnsiColor spec=%p\n", spec);
> > 	fprintf(stderr, "->'%s'\n", spec);
> > 
> > If it's really a broken parameter, the first fprintf will work, and it'll
> > die right away on the second.
> 
> bash$ /home/sasha/src/xterm-228/xterm -e 'vim xxx'
> AllocateAnsiColor spec=0x56d010
> ->'blue3'
> AllocateAnsiColor spec=0x56d030
> ->'magenta3'
> AllocateAnsiColor spec=0x56d0e0
> ->'blue'
> xterm:  warning, error event received:
> X Error of failed request:  BadValue (integer parameter out of range for operation)
>   Major opcode of failed request:  77 (X_ImageText16)
>   Value in failed request:  0x0
>   Serial number of failed request:  399
>   Current serial number in output stream:  402
> 
> I guess we see gdb problem with register variable here in 'spec'.
> Or spoiled stack...

Perhaps the latter - it's going _into_ AllocateAnsiColor() with a usable
value.  If you set a breakpoint on AllocateAnsiColor, you should be able
to see the proper stack (just to check gdb).

I'm assuming there is a type-mismatch someplace - someone thinks that
a type is 64 bits where it should be 32 (or the reverse).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Attachment: pgpX9LsT21kJa.pgp
Description: PGP signature


Reply to: