Bug#319822: xterm crash

2007-08-03 Thread Alexandra N. Kossovsky
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  0x2b87164a806e in _XError (dpy=0x55f450, rep=value optimized out)
  at ../../src/XlibInt.c:2888
  #2  0x2b87164a9dbb in _XReply (dpy=0x55f450, rep=0x7fff950c5120, 
  extra=0, 
  discard=1) at ../../src/XlibInt.c:1817
  #3  0x2b8716496c7b 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?

 
  #4  0x00424007 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...

-- 
Alexandra N. Kossovsky
OKTET Labs (http://www.oktetlabs.ru/)
Phones: +7(921)956-42-86(mobile) +7(812)783-21-91(office)
e-mail: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#319822: xterm crash

2007-08-03 Thread Alexandra N. Kossovsky
Hi.

1. The problem below with the spoiled stack does not have any common with
   the xterm crash. I can fix the spoiled stack with 2-line patch in Xlib,
   but it does not really help.  Looks like an internal gdb problem,
   really.

2. The problem is in X server. The problem exists with amd64 Etch X server
   working together with (amd64|i386) Etch xterm. The problem does not
   exist when I run (amd64|i386) Etch xterm on i386 Etch X server.

Regards,
Alexandra.

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  0x2b87164a806e in _XError (dpy=0x55f450, rep=value optimized 
   out)
   at ../../src/XlibInt.c:2888
   #2  0x2b87164a9dbb in _XReply (dpy=0x55f450, rep=0x7fff950c5120, 
   extra=0, 
   discard=1) at ../../src/XlibInt.c:1817
   #3  0x2b8716496c7b 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?
 
  
   #4  0x00424007 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...
 
 -- 
 Alexandra N. Kossovsky
 OKTET Labs (http://www.oktetlabs.ru/)
 Phones: +7(921)956-42-86(mobile) +7(812)783-21-91(office)
 e-mail: [EMAIL PROTECTED]
 
 
 -- 
 To unsubscribe, send mail to [EMAIL PROTECTED]

-- 
Alexandra N. Kossovsky
OKTET Labs (http://www.oktetlabs.ru/)
Phones: +7(921)956-42-86(mobile) +7(812)783-21-91(office)
e-mail: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#319822: xterm crash

2007-08-03 Thread Thomas Dickey
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  0x2b87164a806e in _XError (dpy=0x55f450, rep=value optimized 
   out)
   at ../../src/XlibInt.c:2888
   #2  0x2b87164a9dbb in _XReply (dpy=0x55f450, rep=0x7fff950c5120, 
   extra=0, 
   discard=1) at ../../src/XlibInt.c:1817
   #3  0x2b8716496c7b 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  0x00424007 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


pgptguwWfLCuu.pgp
Description: PGP signature


Bug#319822: xterm crash

2007-08-03 Thread Alexandra N. Kossovsky
On Thu, Aug 02, 2007 at 05:08:53PM -0400, Thomas Dickey wrote:
 If you have the time, compiling the xterm source (with the appropriate
 options to match Debian's configuration) could perhaps get a usable
 walkback from the debugger.  I can offer advice on that...

I've got apt-get source xterm and re-compiled it (with debug
information).  See below for the output.  Tell me if you need more info.

bash$ gdb xterm
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as x86_64-linux-gnu...Using host libthread_db library 
/lib/libthread_db.so.1.

(gdb) set args -e 'vim xxx'
(gdb) b xerror
Breakpoint 1 at 0x4237b0: file ./misc.c, line 3279.
(gdb) r
Starting program: /usr/bin/xterm -e 'vim xxx'
[Thread debugging using libthread_db enabled]
[New Thread 47859210569600 (LWP 14529)]
[Switching to Thread 47859210569600 (LWP 14529)]

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  0x2b87164a806e in _XError (dpy=0x55f450, rep=value optimized out)
at ../../src/XlibInt.c:2888
#2  0x2b87164a9dbb in _XReply (dpy=0x55f450, rep=0x7fff950c5120, extra=0, 
discard=1) at ../../src/XlibInt.c:1817
#3  0x2b8716496c7b in XParseColor (dpy=0x55f450, cmap=32, spec=0x56d0e0 
blue, 
def=0x7fff950c5180) at ../../src/ParseCol.c:126
#4  0x00424007 in AllocateAnsiColor (xw=0x578970, res=0x57a800, 
spec=0x18b Address 0x18b out of bounds) at ./misc.c:1668
#5  0x004240d0 in xtermGetColorRes (res=0x57a800) at ./misc.c:1710
#6  0x0040efef in SGR_Foreground (xw=0x578970, color=256) at 
./charproc.c:837
#7  0x00412d0a in doparsing (xw=0x578970, c=109, sp=0x5599e0)
at ./charproc.c:2017
#8  0x00414d2d in VTparse (xw=0x578970) at ./charproc.c:2876
#9  0x00414e3c in VTRun () at ./charproc.c:4786
#10 0x00420365 in main (argc=2, argv=value optimized out) at 
./main.c:2416
(gdb) n
3280fprintf(stderr, %s:  warning, error event received:\n, 
xterm_name);
(gdb) 
3279{
(gdb) 
3280fprintf(stderr, %s:  warning, error event received:\n, 
xterm_name);
(gdb) 
xterm:  warning, error event received:
3281(void) XmuPrintDefaultErrorMessage(d, ev, stderr);
(gdb) 
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:  395
  Current serial number in output stream:  398
3282Exit(ERROR_XERROR);
(gdb) 

Program exited with code 0123.
(gdb) 

-- 
Alexandra N. Kossovsky
OKTET Labs (http://www.oktetlabs.ru/)
Phones: +7(921)956-42-86(mobile) +7(812)783-21-91(office)
e-mail: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#319822: xterm crash

2007-08-03 Thread Thomas Dickey
On Fri, Aug 03, 2007 at 03:19:57PM +0400, Alexandra N. Kossovsky wrote:
 On Thu, Aug 02, 2007 at 05:08:53PM -0400, Thomas Dickey wrote:
  If you have the time, compiling the xterm source (with the appropriate
  options to match Debian's configuration) could perhaps get a usable
  walkback from the debugger.  I can offer advice on that...
 
 I've got apt-get source xterm and re-compiled it (with debug
 information).  See below for the output.  Tell me if you need more info.

ok - see notes

 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  0x2b87164a806e in _XError (dpy=0x55f450, rep=value optimized out)
 at ../../src/XlibInt.c:2888
 #2  0x2b87164a9dbb in _XReply (dpy=0x55f450, rep=0x7fff950c5120, extra=0, 
 discard=1) at ../../src/XlibInt.c:1817
 #3  0x2b8716496c7b 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.

 #4  0x00424007 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.  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.

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


pgpRQz3CZ1ZnY.pgp
Description: PGP signature


Bug#319822: xterm crash

2007-08-03 Thread Alexandra N. Kossovsky
On Fri, Aug 03, 2007 at 11:40:57AM -0400, Thomas Dickey wrote:
 On Fri, Aug 03, 2007 at 07:22:09PM +0400, Alexandra N. Kossovsky wrote:
  Hi.
  
  1. The problem below with the spoiled stack does not have any common with
 the xterm crash. I can fix the spoiled stack with 2-line patch in Xlib,
 but it does not really help.  Looks like an internal gdb problem,
 really.
  
  2. The problem is in X server. The problem exists with amd64 Etch X server
 working together with (amd64|i386) Etch xterm. The problem does not
 exist when I run (amd64|i386) Etch xterm on i386 Etch X server.
  
  Regards,
 
 no problem (report bugs)

Thank you for permission, I've nether knew it is possible to report bugs...
However, I do not see any help from DDs (they do not have Etch, they do not
have amd64), so I'm going to dig this problem myself.  No point to report
bug, as I'll install fixed packages in my office without DDs help.


Update for Debian users with the same problem:
the problem is little more tricky. It goes away after restarting X server.
So, it is a wrong state inside X server.

Regards,
Alexandra.

-- 
Alexandra N. Kossovsky
OKTET Labs (http://www.oktetlabs.ru/)
Phones: +7(921)956-42-86(mobile) +7(812)783-21-91(office)
e-mail: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#319822: xterm crash

2007-08-02 Thread Alexandra N. Kossovsky
I can confirm this bug in Etch xterm (222-1etch2), amd64.
Moreover, I can reproduce it!

The following command crashes xterm (and uxterm as well).
LANG=C LANGUAGE=en LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=C vi xxx
(all locale variables not mentioned in the command line are C or POSIX)

xterm error message:
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:  370
  Current serial number in output stream:  374


Please note that cat xxx and less xxx behave correctly.
Opening th file with vi/vim crashes xterm.

One-line file xxx is attached (I've got it from the spambox).

Tell if you need more info. Thank you for your work.

Regards,
Alexandra.
-- 
Alexandra N. Kossovsky
OKTET Labs (http://www.oktetlabs.ru/)
Phones: +7(921)956-42-86(mobile) +7(812)783-21-91(office)
e-mail: [EMAIL PROTECTED]
b style=color:#00;font-size:18px �� �� �  
��� ��� �-

Bug#319822: xterm crash

2007-08-02 Thread Thomas Dickey
On Thu, Aug 02, 2007 at 03:10:06PM +0200, Alexandra N. Kossovsky wrote:
 I can confirm this bug in Etch xterm (222-1etch2), amd64.
 Moreover, I can reproduce it!

I don't have etch (or amd64...), but have Debian/testing - and lots
of versions of xterm.  With that combination, I'm not seeing the
problem - whether it's in xterm or the X libraries.
 
 The following command crashes xterm (and uxterm as well).
 LANG=C LANGUAGE=en LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=C vi xxx
 (all locale variables not mentioned in the command line are C or POSIX)
 
 xterm error message:
 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:  370
   Current serial number in output stream:  374
 
 
 Please note that cat xxx and less xxx behave correctly.
 Opening th file with vi/vim crashes xterm.
 
 One-line file xxx is attached (I've got it from the spambox).
 
 Tell if you need more info. Thank you for your work.

If you have the time, compiling the xterm source (with the appropriate
options to match Debian's configuration) could perhaps get a usable
walkback from the debugger.  I can offer advice on that...
 
 Regards,
 Alexandra.
 -- 
 Alexandra N. Kossovsky
 OKTET Labs (http://www.oktetlabs.ru/)
 Phones: +7(921)956-42-86(mobile) +7(812)783-21-91(office)
 e-mail: [EMAIL PROTECTED]

 b style=color:#00;font-size:18pxëÏÍÐÁÎÉÑ ÐÏ ÕÐÒÁ×ÌÅÎÉÀ ÎÅÄ×ÉÖÉÍÏÓÔØÀ  
 ïïï «áÌØËÏÒ à-ú»


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


pgploMAprBcsI.pgp
Description: PGP signature