emacs-devel
[Top][All Lists]
Advanced

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

RE: [22.1.90]: Point before start of properties


From: Marshall, Simon
Subject: RE: [22.1.90]: Point before start of properties
Date: Wed, 13 Feb 2008 10:13:46 -0000

> So, adding -O (or -O2) to gcc-4.2.3 triggers the problem, and 
> switching to gcc-4.1.2 triggers it as well?

Yes.  Btw, I didn't mention before that gcc gives me lots of warnings of
the form "dispnew.c:3061: warning: incompatible implicit declaration of
built-in function 'alloca'".  (That is the reason why I tried undefing
GNU_MALLOC and HAVE_ALLOCA, though IIRC I could not get rid of the
warnings and made no difference to the problem of calling error at
intervals.c:794.)  Could this be relevant?

> First thing: try to reproduce the problem with -DENABLE_CHECKING.
> This may help us catch the problem at some earlier poin in 
> the execution (it's a long shot, but you never know).

With make CFLAGS="-g -O -DENABLE_CHECKING=1
-DSYSTEM_PURESIZE_EXTRA=1300000", I do not get any earlier abort if I do
"C-x C-f intervals.c RET", ie, it reaches the call to error at
intervals.c:794 as before.  However, I do get an earlier abort if I do
"C-x C-f int TAB" to complete the file name intervals.c:

% ~/slash/usr/local/bin/gdb ./emacs
GNU gdb 6.7.1
Copyright (C) 2007 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 "sparc-sun-solaris2.8"...
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from
terminal]
DISPLAY = dtp020071.misys-risk.com:0.0
TERM = xterm
Breakpoint 1 at 0x116a20: file emacs.c, line 432.
Breakpoint 2 at 0x13b930: file sysdep.c, line 1384.
(gdb) b intervals.c:794
Breakpoint 3 at 0x1edc48: file intervals.c, line 794.
(gdb) r -Q
Starting program:
/homedev/marshals/ftp/emacs-22.2-pretests/gcc-4.2.3-g-O/src/emacs -Q
warning: Temporarily disabling breakpoints for unloaded shared library
"/usr/lib/ld.so.1"
Breakpoint 4 at 0xeea10: file xterm.c, line 7866.

In the emacs frame I did "C-x C-f int TAB" and got:

Breakpoint 1, abort () at emacs.c:432
432       kill (getpid (), SIGABRT);
(gdb) where
#0  abort () at emacs.c:432
#1  0x0017ec8c in die (msg=0x256d88 "non-interval", 
    file=0x256d98 "intervals.c", line=162) at alloc.c:6338
#2  0x001ebc30 in intervals_equal (i0=<value optimized out>,
i1=0xffbecebc)
    at intervals.c:162
#3  0x001eea08 in offset_intervals (buffer=<value optimized out>,
start=12, 
    length=54) at intervals.c:1049
#4  0x0014c560 in insert_from_string_1 (string=<value optimized out>,
pos=0, 
    pos_byte=0, nchars=54, nbytes=54, inherit=0, before_markers=0)
    at insdel.c:1172
#5  0x0014c7ac in insert_from_string (string=8626576, pos=0, pos_byte=0,

    length=54, length_byte=54, inherit=0) at insdel.c:1068
#6  0x0019449c in general_insert_function (insert_func=0x14cc1c
<insert>, 
    insert_from_string_func=0x14c730 <insert_from_string>, inherit=0,
nargs=1, 
    args=<value optimized out>) at editfns.c:2178
#7  0x00194578 in Finsert (nargs=1, args=0xffbed124) at editfns.c:2222
#8  0x001534c8 in do_completion () at minibuf.c:2029
#9  0x001538d0 in Fminibuffer_complete () at minibuf.c:2152
#10 0x0019efac in Ffuncall (nargs=1, args=<value optimized out>) at
eval.c:2990
#11 0x0019b988 in Fcall_interactively (function=5493857,
record_flag=5318657, 
    keys=5382148) at callint.c:861
#12 0x0011bfb0 in Fcommand_execute (cmd=5493857, record_flag=5318657, 
    keys=5318657, special=<value optimized out>) at keyboard.c:10053
#13 0x001312a0 in command_loop_1 () at keyboard.c:1876
#14 0x0019d3e8 in internal_condition_case (bfun=0x12f430
<command_loop_1>, 
    handlers=5386913, hfun=0x12632c <cmd_error>) at eval.c:1484
#15 0x00125534 in command_loop_2 () at keyboard.c:1330
#16 0x0019d4c4 in internal_catch (tag=5413513, func=0x125508
<command_loop_2>, 
    arg=5318657) at eval.c:1224
#17 0x0012611c in command_loop () at keyboard.c:1297
#18 0x001264d4 in recursive_edit_1 () at keyboard.c:1007
#19 0x00154810 in read_minibuf (map=5303197, initial=8448995,
prompt=2727747, 
    backup_n=<value optimized out>, expflag=0, histvar=5467833,
histpos=0, 
    defalt=8448995, allow_props=0, inherit_input_method=0) at
minibuf.c:751
#20 0x0015508c in Fcompleting_read (prompt=2727747, 
    collection=<value optimized out>, predicate=<value optimized out>, 
    require_match=5318657, initial_input=<value optimized out>,
hist=5467833, 
    def=8448995, inherit_input_method=5318657) at minibuf.c:1807
#21 0x00158d68 in Fread_file_name (prompt=2727747, dir=8448995, 
    default_filename=8448995, mustmatch=5318657, 
    initial=<value optimized out>, predicate=5467401) at fileio.c:6414
#22 0x0019f1b0 in Ffuncall (nargs=-4269544, args=<value optimized out>)
    at eval.c:3012
#23 0x001d3e5c in Fbyte_code (bytestr=<value optimized out>, 
    vector=<value optimized out>, maxdepth=7) at bytecode.c:679
#24 0x0019eabc in funcall_lambda (fun=2727260, nargs=2,
arg_vector=0xffbedbc8)
    at eval.c:3180
#25 0x0019eba0 in apply_lambda (fun=2727260, args=5318657, eval_flag=1)
    at eval.c:3104
#26 0x0019e468 in Feval (form=<value optimized out>) at eval.c:2366
#27 0x0019a568 in Fcall_interactively (function=5663633,
record_flag=5318657, 
    keys=5382148) at callint.c:379
#28 0x0011bfb0 in Fcommand_execute (cmd=5663633, record_flag=5318657, 
    keys=5318657, special=<value optimized out>) at keyboard.c:10053
#29 0x001312a0 in command_loop_1 () at keyboard.c:1876
#30 0x0019d3e8 in internal_condition_case (bfun=0x12f430
<command_loop_1>, 
    handlers=5386913, hfun=0x12632c <cmd_error>) at eval.c:1484
#31 0x00125534 in command_loop_2 () at keyboard.c:1330
#32 0x0019d4c4 in internal_catch (tag=5377025, func=0x125508
<command_loop_2>, 
    arg=5318657) at eval.c:1224
#33 0x001260d8 in command_loop () at keyboard.c:1309
#34 0x001264d4 in recursive_edit_1 () at keyboard.c:1007
#35 0x00126790 in Frecursive_edit () at keyboard.c:1068
#36 0x00118224 in main (argc=2, argv=0xffbee404) at emacs.c:1770

Lisp Backtrace:
"minibuffer-complete" (0x503c00)
"call-interactively" (0x53d461)
"read-file-name" (0x299f43)
"find-file-read-args" (0x299f43)
"call-interactively" (0x566b91)
(gdb) up
#1  0x0017ec8c in die (msg=0x256d88 "non-interval", 
    file=0x256d98 "intervals.c", line=162) at alloc.c:6338
6338      abort ();
(gdb) up
#2  0x001ebc30 in intervals_equal (i0=<value optimized out>,
i1=0xffbecebc)
    at intervals.c:162
162       if (DEFAULT_INTERVAL_P (i0) || DEFAULT_INTERVAL_P (i1))
(gdb) print i0
$3 = <value optimized out>
(gdb) print i1
$4 = (INTERVAL) 0xffbecebc
(gdb) print *i1
$5 = {
  total_length = 2055860, 
  position = 5244928, 
  left = 0x8, 
  right = 0x84afb3, 
  up = {
    interval = 0x80ebe3, 
    obj = 8448995
  }, 
  up_obj = 0, 
  gcmarkbit = 0, 
  write_protect = 0, 
  visible = 0, 
  front_sticky = 0, 
  rear_sticky = 0, 
  plist = 5318657
}
(gdb) up
#3  0x001eea08 in offset_intervals (buffer=<value optimized out>,
start=12, 
    length=54) at intervals.c:1049
1049              else if (! intervals_equal (prev, &newi))
(gdb) print prev
No symbol "prev" in current context.
(gdb) print newi
No symbol "newi" in current context.
(gdb) 

I can understand not being able to see i0 in intervals_equal, but I
don't understand not being able to see prev and newi in the caller.  I
tried to reproduce this with CFLAGS="-g -DENABLE_CHECKING=1
-DSYSTEM_PURESIZE_EXTRA=1300000", ie, no optimisation, but could not
reproduce the abort (or call of error).

> Then try to narrow down the problematic source file: compile all files
> with "gcc-4.2.3 -g" except for one (e.g. intervals.c) and see 
> if you con still reproduce the problem.  If you can, recompile
intervals.c with
> "gcc-4.2.3 -g" to double check that the problem then disappears.
> If that's not that file, then use binary search to figure out 
> which file is causing trouble.

Blimey.  Compiling intervals.c with CFLAGS="-g -O -DENABLE_CHECKING=1
-DSYSTEM_PURESIZE_EXTRA=1300000" (everything else the same except for no
-O) results in an emacs that triggers the abort as soon as I type C-x
C-f:

Emacs fatal error: intervals.c:162: non-interval

Breakpoint 1, abort () at emacs.c:432
432       kill (getpid (), SIGABRT);
(gdb) where
#0  abort () at emacs.c:432
#1  0x00313618 in die (msg=0x4a3d80 "non-interval", 
    file=0x4a3d90 "intervals.c", line=162) at alloc.c:6338
#2  0x003f52f4 in intervals_equal (i0=<value optimized out>,
i1=0xffbecf2c)
    at intervals.c:162
#3  0x003f8040 in offset_intervals (buffer=<value optimized out>,
start=12, 
    length=42) at intervals.c:1049
#4  0x00290e3c in insert_from_string_1 (string=10872851, pos=0,
pos_byte=0, 
    nchars=42, nbytes=42, inherit=0, before_markers=0) at insdel.c:1172
#5  0x0029060c in insert_from_string (string=10872851, pos=0,
pos_byte=0, 
    length=42, length_byte=42, inherit=0) at insdel.c:1068
#6  0x0033371c in general_insert_function (insert_func=0x28fadc
<insert>, 
    insert_from_string_func=0x290558 <insert_from_string>, inherit=0,
nargs=1, 
    args=0xffbed2e8) at editfns.c:2178
#7  0x003337c4 in Finsert (nargs=1, args=0x40020000) at editfns.c:2222
#8  0x0029d40c in read_minibuf (map=7719821, initial=10872851,
prompt=5143059, 
    backup_n=0, expflag=0, histvar=7881401, histpos=0, defalt=10872851, 
    allow_props=0, inherit_input_method=0) at minibuf.c:730
#9  0x002a2c38 in Fcompleting_read (prompt=5143059, collection=7884305, 
    predicate=10872851, require_match=7735297, initial_input=10872851, 
    hist=7881401, def=10872851, inherit_input_method=7735297) at
minibuf.c:1807
#10 0x002bf2a0 in Fread_file_name (prompt=5143059, dir=10872851, 
    default_filename=10872851, mustmatch=7735297, initial=7735297, 
    predicate=7735297) at fileio.c:6414
#11 0x0034ee70 in Ffuncall (nargs=5, args=0xffbed5d0) at eval.c:3012
#12 0x003c4fa4 in Fbyte_code (bytestr=5142611, vector=5142692,
maxdepth=40)
    at bytecode.c:679
#13 0x0034fec0 in funcall_lambda (fun=5142572, nargs=2,
arg_vector=0xffbed8d0)
    at eval.c:3180
#14 0x0034f59c in apply_lambda (fun=5142572, args=5143053, eval_flag=1)
    at eval.c:3104
#15 0x0034bf60 in Feval (form=5143045) at eval.c:2366
#16 0x00340a2c in Fcall_interactively (function=8060817,
record_flag=7735297, 
    keys=7798788) at callint.c:379
#17 0x00251c34 in Fcommand_execute (cmd=8060817, record_flag=7735297, 
    keys=7735297, special=7735297) at keyboard.c:10053
#18 0x0022a448 in command_loop_1 () at keyboard.c:1876
#19 0x003481d0 in internal_condition_case (bfun=0x225be4
<command_loop_1>, 
    handlers=7803553, hfun=0x224bac <cmd_error>) at eval.c:1484
#20 0x002254b4 in command_loop_2 () at keyboard.c:1330
#21 0x00347808 in internal_catch (tag=7793665, func=0x225488
<command_loop_2>, 
    arg=7735297) at eval.c:1224
#22 0x00225428 in command_loop () at keyboard.c:1309
#23 0x00224108 in recursive_edit_1 () at keyboard.c:1007
#24 0x00224790 in Frecursive_edit () at keyboard.c:1068
#25 0x002213e0 in main (argc=2, argv=0xffbee444) at emacs.c:1770

Lisp Backtrace:
"read-file-name" (0x4e7a13)
"find-file-read-args" (0x4e7a13)
"call-interactively" (0x7aff91)
(gdb) 

Do you think these ENABLE_CHECKING aborts are genuine?  Could there be a
problem with the definition of NULL_INTERVAL_P (I see its definition has
changed)?

Compiling everything with CFLAGS="-g -O" results in error being called
at intervals.c:794 on C-x C-f intervals.c RET, as described before.
Recompiling intervals.c with CFLAGS="-g" results in error not being
called.

Compiling everything with CFLAGS="-g" results in error not being called.
Recompiling intervals.c with CFLAGS="-g -0" results in error being
called.

So, ENABLE_CHECKING not withstanding, it appears to be a problem with
the optimisation of intervals.c itself.

Any other thoughts?

Thanks, Simon.


 "Misys" is the trade name for Misys plc (registered in England and Wales). 
Registration Number: 01360027. Registered office: Burleigh House, Chapel Oak, 
Salford Priors, Evesham WR11 8SP. For a list of Misys group operating companies 
please go to http://www.misys.com/html/about_us/group_operating_companies/. 
This email and any attachments have been scanned for known viruses using 
multiple scanners. 
 
We believe that this email and any attachments are virus free, however the 
recipient must take full responsibility for virus checking. This email message 
is intended for the named recipient only. It may be privileged and/or 
confidential. If you are not the named recipient of this email please notify us 
immediately and do not copy it or use it for any purpose, nor disclose its 
contents to any other person. This email does not constitute the commencement 
of legal relations between you and Misys plc. Please refer to the executed 
contract between you and the relevant member of the Misys group for the 
identity of the contracting party with which you are dealing. 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]