all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18586: Fwd: Re: 24.4.50; "Not an in-range integer, float, or cons of integers" from x-focus-frame
       [not found] <542A6D26.2000906@broadcom.com>
@ 2014-10-01 11:28 ` Rupert Swarbrick
  0 siblings, 0 replies; only message in thread
From: Rupert Swarbrick @ 2014-10-01 11:28 UTC (permalink / raw)
  To: 18586

[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]

Drat, I obviously hit "reply" rather than "reply all" when sending the message 
below.

Rupert


-------- Original Message --------
Subject: Re: 24.4.50; "Not an in-range integer, float, or cons of integers" 
from x-focus-frame
Date: Tue, 30 Sep 2014 09:43:18 +0100
From: Rupert Swarbrick <ruperts@broadcom.com>
To: Paul Eggert <eggert@cs.ucla.edu>

On 30/09/2014 05:03, Paul Eggert wrote:
> Thanks for the bug report.  I'm not observing the problem on my platform with a
> similar configuration (Emacs trunk bzr 117978, Fedora 20 x86-64, gcc 4.9.1,
> detailed configuration below).  I ran 'emacs -Q' and then typed "(x-focus-frame
> (selected-frame)) C-j"; the result was nil.
>
> Can you put a breakpoint on cons_to_unsigned's call to 'error', and similarly
> on cons_to_signed's call to 'error', and get a backtrace at that point?

Yep. I'm attaching a GDB session to this message (if debbugs eats it, I'll send
a followup post with the text inline).

The x_fill_property_data function calls cons_to_signed, with an argument of
0x385f739b4 (note 9 hex digits). Treating it as a 64 bit signed integer, this
is larger than X_LONG_MAX (0x7fffffff on my system).


Rupert





[-- Attachment #2: gdb-trace.txt --]
[-- Type: text/plain, Size: 3365 bytes --]

/tmp/ruperts/emacs-build> gdb --args src/emacs -Q --eval '(x-focus-frame (selected-frame))'
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/ruperts/emacs-build/src/emacs...done.
(gdb) break data.c:2545
Breakpoint 1 at 0x5493a2: file ../../emacs-source/src/data.c, line 2545.
(gdb) r
Starting program: /tmp/ruperts/emacs-build/src/emacs -Q --eval \(x-focus-frame\ \(selected-frame\)\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff1a70700 (LWP 13085)]

Breakpoint 1, cons_to_signed (c=<optimized out>, min=-2147483648, max=2147483647) at ../../emacs-source/src/data.c:2545
2545        error ("Not an in-range integer, float, or cons of integers");
(gdb) bt 10
#0  cons_to_signed (c=<optimized out>, min=-2147483648, max=2147483647) at ../../emacs-source/src/data.c:2545
#1  0x00000000004d5471 in x_fill_property_data (dpy=0x1394f70, data=<optimized out>, ret=<optimized out>, format=32) at ../../emacs-source/src/xselect.c:2314
#2  0x00000000004d5886 in x_send_client_event (display=<optimized out>, dest=<optimized out>, from=<optimized out>, message_type=239, format=<optimized out>, 
    values=21641606) at ../../emacs-source/src/xselect.c:2597
#3  0x00000000004d16ad in x_focus_frame (f=0x10bb600) at ../../emacs-source/src/xfns.c:3372
#4  0x000000000041bc41 in Fx_focus_frame (frame=<optimized out>) at ../../emacs-source/src/frame.c:2237
#5  0x000000000055a000 in eval_sub (form=<optimized out>) at ../../emacs-source/src/eval.c:2178
#6  0x000000000055c2c1 in Feval (form=21641542, lexical=<optimized out>) at ../../emacs-source/src/eval.c:1993
#7  0x000000000055abeb in Ffuncall (nargs=<optimized out>, args=<optimized out>) at ../../emacs-source/src/eval.c:2726
#8  0x000000000059066d in exec_byte_code (bytestr=3783118445, vector=-2147483648, maxdepth=2147483647, args_template=1, nargs=2, args=0x7fffffffd690)
    at ../../emacs-source/src/bytecode.c:920
#9  0x000000000055a984 in Ffuncall (nargs=<optimized out>, args=0x7fffffffd688) at ../../emacs-source/src/eval.c:2784
(More stack frames follow...)
(gdb) frame 1
#1  0x00000000004d5471 in x_fill_property_data (dpy=0x1394f70, data=<optimized out>, ret=<optimized out>, format=32) at ../../emacs-source/src/xselect.c:2314
2314                val = cons_to_signed (o, X_LONG_MIN, X_LONG_MAX);
(gdb) l
2309                     The XDnd spec. is not explicit about negative values,
2310                     but let's assume negative v2 is sent modulo 2**16.  */
2311                  val = (v1 << 16) | (v2 & 0xffff);
2312                }
2313              else
2314                val = cons_to_signed (o, X_LONG_MIN, X_LONG_MAX);
2315            }
2316          else if (STRINGP (o))
2317            {
2318              block_input ();
(gdb) p/x o
$1 = 0x385f739b4
(gdb) p/x X_LONG_MIN
$2 = 0x80000000
(gdb) p/x X_LONG_MAX
$3 = 0x7fffffff
(gdb) p/x LONG_MAX
$4 = 0x7fffffffffffffff

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-01 11:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <542A6D26.2000906@broadcom.com>
2014-10-01 11:28 ` bug#18586: Fwd: Re: 24.4.50; "Not an in-range integer, float, or cons of integers" from x-focus-frame Rupert Swarbrick

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.