From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Marshall, Simon" Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: RE: [22.1.90]: Point before start of properties Date: Wed, 13 Feb 2008 10:13:46 -0000 Message-ID: <6EE216E1AA959543A555C60FF34FB76702EEDA6E@maileube01.misys.global.ad> References: <6EE216E1AA959543A555C60FF34FB76702E48034@maileube01.misys.global.ad><87wspcj0ou.fsf@stupidchicken.com><6EE216E1AA959543A555C60FF34FB76702EED4A1@maileube01.misys.global.ad> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1202897694 9066 80.91.229.12 (13 Feb 2008 10:14:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2008 10:14:54 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Chong Yidong To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 13 11:15:16 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JPEdz-0008Kc-D3 for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2008 11:15:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPEdV-0005i5-Iz for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2008 05:14:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPEdL-0005eD-PI for emacs-devel@gnu.org; Wed, 13 Feb 2008 05:14:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPEdK-0005bF-9i for emacs-devel@gnu.org; Wed, 13 Feb 2008 05:14:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPEdK-0005az-1c for emacs-devel@gnu.org; Wed, 13 Feb 2008 05:14:30 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JPEdK-0005Gu-JH for emacs-devel@gnu.org; Wed, 13 Feb 2008 05:14:30 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JPEdJ-0000Vt-DH for emacs-pretest-bug@gnu.org; Wed, 13 Feb 2008 05:14:29 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JPEdB-0005Ec-W5 for emacs-pretest-bug@gnu.org; Wed, 13 Feb 2008 05:14:25 -0500 Original-Received: from cluster-b.mailcontrol.com ([217.68.146.190]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JPEdB-0005Dk-At for emacs-pretest-bug@gnu.org; Wed, 13 Feb 2008 05:14:21 -0500 Original-Received: from rly10b.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly10b.srv.mailcontrol.com (MailControl) with ESMTP id m1DAECke003143 for ; Wed, 13 Feb 2008 10:14:17 GMT Original-Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly10b.srv.mailcontrol.com (MailControl) id m1DADtDw002602 for emacs-pretest-bug@gnu.org; Wed, 13 Feb 2008 10:13:55 GMT Original-Received: from maileube01.misys.global.ad ([217.196.233.105]) by rly10b-eth0.srv.mailcontrol.com (envelope-sender Simon.Marshall@misys.com) (MIMEDefang) with ESMTP id m1DACbkI029393; Wed, 13 Feb 2008 10:13:55 +0000 (GMT) x-mimeole: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [22.1.90]: Point before start of properties Thread-Index: AchtpaN+MKaei6yaTI26FQe//mcxHAAekqPg X-Scanned-By: MailControl A-08-00-01 (www.mailcontrol.com) on 10.66.1.120 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88939 gmane.emacs.pretest.bugs:21058 Archived-At: > So, adding -O (or -O2) to gcc-4.2.3 triggers the problem, and=20 > 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=20 > the execution (it's a long shot, but you never know). With make CFLAGS=3D"-g -O -DENABLE_CHECKING=3D1 -DSYSTEM_PURESIZE_EXTRA=3D1300000", 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 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 =3D dtp020071.misys-risk.com:0.0 TERM =3D 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=3D0x256d88 "non-interval",=20 file=3D0x256d98 "intervals.c", line=3D162) at alloc.c:6338 #2 0x001ebc30 in intervals_equal (i0=3D, i1=3D0xffbecebc) at intervals.c:162 #3 0x001eea08 in offset_intervals (buffer=3D, start=3D12,=20 length=3D54) at intervals.c:1049 #4 0x0014c560 in insert_from_string_1 (string=3D, pos=3D0,=20 pos_byte=3D0, nchars=3D54, nbytes=3D54, inherit=3D0, before_markers=3D0) at insdel.c:1172 #5 0x0014c7ac in insert_from_string (string=3D8626576, pos=3D0, pos_byte= =3D0, length=3D54, length_byte=3D54, inherit=3D0) at insdel.c:1068 #6 0x0019449c in general_insert_function (insert_func=3D0x14cc1c ,=20 insert_from_string_func=3D0x14c730 , inherit=3D0, nargs=3D1,=20 args=3D) at editfns.c:2178 #7 0x00194578 in Finsert (nargs=3D1, args=3D0xffbed124) 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=3D1, args=3D) at eval.c:2990 #11 0x0019b988 in Fcall_interactively (function=3D5493857, record_flag=3D5318657,=20 keys=3D5382148) at callint.c:861 #12 0x0011bfb0 in Fcommand_execute (cmd=3D5493857, record_flag=3D5318657,= =20 keys=3D5318657, special=3D) at keyboard.c:10053 #13 0x001312a0 in command_loop_1 () at keyboard.c:1876 #14 0x0019d3e8 in internal_condition_case (bfun=3D0x12f430 ,=20 handlers=3D5386913, hfun=3D0x12632c ) at eval.c:1484 #15 0x00125534 in command_loop_2 () at keyboard.c:1330 #16 0x0019d4c4 in internal_catch (tag=3D5413513, func=3D0x125508 ,=20 arg=3D5318657) 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=3D5303197, initial=3D8448995, prompt=3D2727747,=20 backup_n=3D, expflag=3D0, histvar=3D5467833, histpos=3D0,=20 defalt=3D8448995, allow_props=3D0, inherit_input_method=3D0) at minibuf.c:751 #20 0x0015508c in Fcompleting_read (prompt=3D2727747,=20 collection=3D, predicate=3D,= =20 require_match=3D5318657, initial_input=3D, hist=3D5467833,=20 def=3D8448995, inherit_input_method=3D5318657) at minibuf.c:1807 #21 0x00158d68 in Fread_file_name (prompt=3D2727747, dir=3D8448995,=20 default_filename=3D8448995, mustmatch=3D5318657,=20 initial=3D, predicate=3D5467401) at fileio.c:6414 #22 0x0019f1b0 in Ffuncall (nargs=3D-4269544, args=3D) at eval.c:3012 #23 0x001d3e5c in Fbyte_code (bytestr=3D,=20 vector=3D, maxdepth=3D7) at bytecode.c:679 #24 0x0019eabc in funcall_lambda (fun=3D2727260, nargs=3D2, arg_vector=3D0xffbedbc8) at eval.c:3180 #25 0x0019eba0 in apply_lambda (fun=3D2727260, args=3D5318657, eval_flag=3D= 1) at eval.c:3104 #26 0x0019e468 in Feval (form=3D) at eval.c:2366 #27 0x0019a568 in Fcall_interactively (function=3D5663633, record_flag=3D5318657,=20 keys=3D5382148) at callint.c:379 #28 0x0011bfb0 in Fcommand_execute (cmd=3D5663633, record_flag=3D5318657,= =20 keys=3D5318657, special=3D) at keyboard.c:10053 #29 0x001312a0 in command_loop_1 () at keyboard.c:1876 #30 0x0019d3e8 in internal_condition_case (bfun=3D0x12f430 ,=20 handlers=3D5386913, hfun=3D0x12632c ) at eval.c:1484 #31 0x00125534 in command_loop_2 () at keyboard.c:1330 #32 0x0019d4c4 in internal_catch (tag=3D5377025, func=3D0x125508 ,=20 arg=3D5318657) 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=3D2, argv=3D0xffbee404) 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=3D0x256d88 "non-interval",=20 file=3D0x256d98 "intervals.c", line=3D162) at alloc.c:6338 6338 abort (); (gdb) up #2 0x001ebc30 in intervals_equal (i0=3D, i1=3D0xffbecebc) at intervals.c:162 162 if (DEFAULT_INTERVAL_P (i0) || DEFAULT_INTERVAL_P (i1)) (gdb) print i0 $3 =3D (gdb) print i1 $4 =3D (INTERVAL) 0xffbecebc (gdb) print *i1 $5 =3D { total_length =3D 2055860,=20 position =3D 5244928,=20 left =3D 0x8,=20 right =3D 0x84afb3,=20 up =3D { interval =3D 0x80ebe3,=20 obj =3D 8448995 },=20 up_obj =3D 0,=20 gcmarkbit =3D 0,=20 write_protect =3D 0,=20 visible =3D 0,=20 front_sticky =3D 0,=20 rear_sticky =3D 0,=20 plist =3D 5318657 } (gdb) up #3 0x001eea08 in offset_intervals (buffer=3D, start=3D12,=20 length=3D54) 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)=20 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=3D"-g -DENABLE_CHECKING=3D1 -DSYSTEM_PURESIZE_EXTRA=3D1300000", 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=20 > 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=20 > which file is causing trouble. Blimey. Compiling intervals.c with CFLAGS=3D"-g -O -DENABLE_CHECKING=3D1 -DSYSTEM_PURESIZE_EXTRA=3D1300000" (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=3D0x4a3d80 "non-interval",=20 file=3D0x4a3d90 "intervals.c", line=3D162) at alloc.c:6338 #2 0x003f52f4 in intervals_equal (i0=3D, i1=3D0xffbecf2c) at intervals.c:162 #3 0x003f8040 in offset_intervals (buffer=3D, start=3D12,=20 length=3D42) at intervals.c:1049 #4 0x00290e3c in insert_from_string_1 (string=3D10872851, pos=3D0, pos_byte=3D0,=20 nchars=3D42, nbytes=3D42, inherit=3D0, before_markers=3D0) at insdel.c:= 1172 #5 0x0029060c in insert_from_string (string=3D10872851, pos=3D0, pos_byte=3D0,=20 length=3D42, length_byte=3D42, inherit=3D0) at insdel.c:1068 #6 0x0033371c in general_insert_function (insert_func=3D0x28fadc ,=20 insert_from_string_func=3D0x290558 , inherit=3D0, nargs=3D1,=20 args=3D0xffbed2e8) at editfns.c:2178 #7 0x003337c4 in Finsert (nargs=3D1, args=3D0x40020000) at editfns.c:2222 #8 0x0029d40c in read_minibuf (map=3D7719821, initial=3D10872851, prompt=3D5143059,=20 backup_n=3D0, expflag=3D0, histvar=3D7881401, histpos=3D0, defalt=3D108= 72851,=20 allow_props=3D0, inherit_input_method=3D0) at minibuf.c:730 #9 0x002a2c38 in Fcompleting_read (prompt=3D5143059, collection=3D7884305,= =20 predicate=3D10872851, require_match=3D7735297, initial_input=3D10872851= ,=20 hist=3D7881401, def=3D10872851, inherit_input_method=3D7735297) at minibuf.c:1807 #10 0x002bf2a0 in Fread_file_name (prompt=3D5143059, dir=3D10872851,=20 default_filename=3D10872851, mustmatch=3D7735297, initial=3D7735297,=20 predicate=3D7735297) at fileio.c:6414 #11 0x0034ee70 in Ffuncall (nargs=3D5, args=3D0xffbed5d0) at eval.c:3012 #12 0x003c4fa4 in Fbyte_code (bytestr=3D5142611, vector=3D5142692, maxdepth=3D40) at bytecode.c:679 #13 0x0034fec0 in funcall_lambda (fun=3D5142572, nargs=3D2, arg_vector=3D0xffbed8d0) at eval.c:3180 #14 0x0034f59c in apply_lambda (fun=3D5142572, args=3D5143053, eval_flag=3D= 1) at eval.c:3104 #15 0x0034bf60 in Feval (form=3D5143045) at eval.c:2366 #16 0x00340a2c in Fcall_interactively (function=3D8060817, record_flag=3D7735297,=20 keys=3D7798788) at callint.c:379 #17 0x00251c34 in Fcommand_execute (cmd=3D8060817, record_flag=3D7735297,= =20 keys=3D7735297, special=3D7735297) at keyboard.c:10053 #18 0x0022a448 in command_loop_1 () at keyboard.c:1876 #19 0x003481d0 in internal_condition_case (bfun=3D0x225be4 ,=20 handlers=3D7803553, hfun=3D0x224bac ) at eval.c:1484 #20 0x002254b4 in command_loop_2 () at keyboard.c:1330 #21 0x00347808 in internal_catch (tag=3D7793665, func=3D0x225488 ,=20 arg=3D7735297) 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=3D2, argv=3D0xffbee444) at emacs.c:1770 Lisp Backtrace: "read-file-name" (0x4e7a13) "find-file-read-args" (0x4e7a13) "call-interactively" (0x7aff91) (gdb)=20 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=3D"-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=3D"-g" results in error not being called. Compiling everything with CFLAGS=3D"-g" results in error not being called. Recompiling intervals.c with CFLAGS=3D"-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 O= ak, Salford Priors, Evesham WR11 8SP. For a list of Misys group operating c= ompanies please go to http://www.misys.com/html/about_us/group_operating_co= mpanies/. This email and any attachments have been scanned for known viruse= s using multiple scanners.=20 =20 We believe that this email and any attachments are virus free, however the = recipient must take full responsibility for virus checking. This email mess= age is intended for the named recipient only. It may be privileged and/or c= onfidential. 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 commen= cement of legal relations between you and Misys plc. Please refer to the ex= ecuted contract between you and the relevant member of the Misys group for = the identity of the contracting party with which you are dealing.=20