From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#17168: 24.3.50; Segfault at mark_object Date: Thu, 03 Apr 2014 00:55:14 -0700 Message-ID: <533D13E2.3060300@dancol.org> References: <87y4zop44m.fsf@yahoo.fr> <533C3AF5.6070502@yandex.ru> <533C6905.9060309@dancol.org> <83bnwjbh8v.fsf@gnu.org> <533C75A6.60900@dancol.org> <533D06E6.2060001@yandex.ru> <533D07EF.1040502@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CrRGoDVqg6eqe4uhgqBgG4cEAgsTUJKn7" X-Trace: ger.gmane.org 1396524576 5047 80.91.229.3 (3 Apr 2014 11:29:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Apr 2014 11:29:36 +0000 (UTC) To: Dmitry Antipov , 17168@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 03 13:29:31 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WVeHy-00075K-89 for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Apr 2014 11:50:26 +0200 Original-Received: from localhost ([::1]:42532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVcVW-0006SE-Pb for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Apr 2014 03:56:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVcVN-0006FC-79 for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 03:56:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVcVH-0008Gz-RE for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 03:56:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVcVH-0008Gq-Ib for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 03:56:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WVcVG-00086P-Ar for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 03:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Apr 2014 07:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17168 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 17168-submit@debbugs.gnu.org id=B17168.139651172331092 (code B ref 17168); Thu, 03 Apr 2014 07:56:02 +0000 Original-Received: (at 17168) by debbugs.gnu.org; 3 Apr 2014 07:55:23 +0000 Original-Received: from localhost ([127.0.0.1]:33698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVcUc-00085N-H1 for submit@debbugs.gnu.org; Thu, 03 Apr 2014 03:55:23 -0400 Original-Received: from dancol.org ([96.126.100.184]:45967) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVcUX-00085C-CJ for 17168@debbugs.gnu.org; Thu, 03 Apr 2014 03:55:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=QAQ1HO6JfIPx1ZOWIGeBHH0QzZJylTD/zLib6z06SHw=; b=eFpk3r8FYqLr5sPv48qc3H0LT0ZWewMwU8Mht67QypYXikpkQ0kbPNtxe7gIkirYU4slK2OJ1nX6oTR7RTNyKGW9cXxD11qZ2H3HHptO443FQQvJ0Ot3EG5YVEd9kB4SYd20g2urVx7Oi0BEhmmwJhYKtzDJf1gEL5eOfxmZP/gzZMQ6KqkUdgeY1CyextqTV4d8j+LrMcuRTCd1/h3D2jNNdqfUt+/t9YZIZlNRcLYAiyDVoQGNMAhrKYoJyIcrH4axEBrg02T4zpe4kVIHbkHKU2zbwkynY9/T6cdkf1/hyv9nXp15Y/z46YueueYJOyIFt3ddPR0mTiSBr7gcDQ==; Original-Received: from [2601:8:b200:551::2b1] by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1WVcUW-0001AB-6h; Thu, 03 Apr 2014 00:55:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <533D07EF.1040502@yandex.ru> X-Enigmail-Version: 1.6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87671 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CrRGoDVqg6eqe4uhgqBgG4cEAgsTUJKn7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 04/03/2014 12:04 AM, Dmitry Antipov wrote: > On 04/03/2014 10:59 AM, Dmitry Antipov wrote: >=20 >> 3. Run 'emacs -Q', then M-x byte-force-recompile >> /path/to/trunk/lis/org > ^^^^^^^ > Mean /path/to/trunk/lisp/org, i.e. all Org mode. Nice work. What gave you the idea of using byte-force-recompile to repro? I'd tried a few other stress cases myself and couldn't find anything. Your repro works perfectly. In eval-after-load, we have code that looks like this: (fset fun (lambda (file) (when (equal file lfn) (remove-hook 'after-load-functions fun) (funcall func)))) This code looks just like the subr.el code that was causing problems for Richard. I changed eval-after-load locally to something like this and re-ran: (fset fun (suspicious-object (lambda (file) (when (equal file lfn) (remove-hook 'after-load-functions fun) (funcall func))))) When your assertion hits, the vector we're trying to free mark is dead and seems to have garbage in the function slot. It's already been freed. Below is the spot where we're freeing that lambda. If we don't set an alloc.c breakpoint and let the code continue to assertion failure, then the stack in suspicious_free_history is exactly what's below. Breakpoint 4, detect_suspicious_free (ptr=3D0x1c363f8) at alloc.c:6868 6868 rec =3D &suspicious_free_history[suspicious_free_history_index++]; (gdb) wher #0 detect_suspicious_free (ptr=3D0x1c363f8) at alloc.c:6868 #1 0x000000000056779e in cleanup_vector (vector=3D0x1c363f8) at alloc.c:= 2959 #2 0x0000000000567962 in sweep_vectors () at alloc.c:3017 #3 0x000000000056dd69 in gc_sweep () at alloc.c:6738 #4 0x000000000056b893 in Fgarbage_collect () at alloc.c:5632 #5 0x00000000004e4c95 in maybe_gc () at lisp.h:4520 #6 0x00000000005d96f4 in exec_byte_code (bytestr=3D13432081, vector=3D29098381, maxdepth=3D16, args_template=3D0, nargs=3D0, args=3D0x7fffffff9410) at bytecode.c:753 #7 0x0000000000590e39 in funcall_lambda (fun=3D29327469, nargs=3D0, arg_vector=3D0x7fffffff9410) at eval.c:2983 #8 0x0000000000590828 in Ffuncall (nargs=3D1, args=3D0x7fffffff9408) at eval.c:2864 #9 0x00000000005d9ecb in exec_byte_code (bytestr=3D13433121, vector=3D29327533, maxdepth=3D4, args_template=3D0, nargs=3D0, args=3D0x7fffffff9928) at bytecode.c:919 #10 0x0000000000590e39 in funcall_lambda (fun=3D29098549, nargs=3D0, arg_vector=3D0x7fffffff9928) at eval.c:2983 #11 0x0000000000590828 in Ffuncall (nargs=3D1, args=3D0x7fffffff9920) at eval.c:2864 #12 0x000000000058ee87 in eval_sub (form=3D29022502) at eval.c:2157 #13 0x000000000058cb9a in internal_lisp_condition_case (var=3D13413026, bodyform=3D29022502, handlers=3D29022406) at eval.c:1323 #14 0x00000000005db0ac in exec_byte_code (bytestr=3D13431537, vector=3D18344837, maxdepth=3D64, args_template=3D1028, nargs=3D1, args=3D0x7fffffffa0f8= ) at bytecode.c:1169 #15 0x0000000000590e39 in funcall_lambda (fun=3D18345373, nargs=3D1, arg_vector=3D0x7fffffffa0f0) at eval.c:2983 #16 0x0000000000590828 in Ffuncall (nargs=3D2, args=3D0x7fffffffa0e8) at eval.c:2864 #17 0x00000000005d9ecb in exec_byte_code (bytestr=3D13425857, vector=3D18336269, maxdepth=3D68, args_template=3D2052, nargs=3D2, args=3D0x7fffffffa680= ) at bytecode.c:919 #18 0x0000000000590e39 in funcall_lambda (fun=3D18337101, nargs=3D2, arg_vector=3D0x7fffffffa670) at eval.c:2983 #19 0x0000000000590828 in Ffuncall (nargs=3D3, args=3D0x7fffffffa668) at eval.c:2864 #20 0x00000000005d9ecb in exec_byte_code (bytestr=3D13424785, vector=3D17895757, maxdepth=3D40, args_template=3D4100, nargs=3D3, args=3D0x7fffffffabd0= ) at bytecode.c:919 #21 0x0000000000590e39 in funcall_lambda (fun=3D17895885, nargs=3D3, arg_vector=3D0x7fffffffabb8) at eval.c:2983 #22 0x0000000000590828 in Ffuncall (nargs=3D4, args=3D0x7fffffffabb0) at eval.c:2864 #23 0x00000000005d9ecb in exec_byte_code (bytestr=3D13414625, vector=3D17008333, maxdepth=3D28, args_template=3D0, nargs=3D0, args=3D0x7fffffffb0e0) at bytecode.c:919 #24 0x0000000000590e39 in funcall_lambda (fun=3D18006989, nargs=3D0, arg_vector=3D0x7fffffffb0e0) at eval.c:2983 #25 0x0000000000590828 in Ffuncall (nargs=3D1, args=3D0x7fffffffb0d8) at eval.c:2864 #26 0x00000000005d9ecb in exec_byte_code (bytestr=3D13424001, vector=3D18250445, maxdepth=3D4, args_template=3D0, nargs=3D0, args=3D0x7fffffffb5f8) at bytecode.c:919 #27 0x0000000000590e39 in funcall_lambda (fun=3D18327557, nargs=3D0, arg_vector=3D0x7fffffffb5f8) at eval.c:2983 #28 0x0000000000590828 in Ffuncall (nargs=3D1, args=3D0x7fffffffb5f0) at eval.c:2864 #29 0x000000000058ee87 in eval_sub (form=3D13218422) at eval.c:2157 #30 0x000000000058cb9a in internal_lisp_condition_case (var=3D13412402, bodyform=3D13218422, handlers=3D13218310) at eval.c:1323 #31 0x00000000005db0ac in exec_byte_code (bytestr=3D13414065, vector=3D17986453, maxdepth=3D104, args_template=3D3076, nargs=3D3, args=3D0x7fffffffbdf= 0) at bytecode.c:1169 #32 0x0000000000590e39 in funcall_lambda (fun=3D17986813, nargs=3D3, arg_vector=3D0x7fffffffbdd8) at eval.c:2983 #33 0x0000000000590828 in Ffuncall (nargs=3D4, args=3D0x7fffffffbdd0) at eval.c:2864 #34 0x00000000005d9ecb in exec_byte_code (bytestr=3D13413841, vector=3D17986061, maxdepth=3D20, args_template=3D1028, nargs=3D1, args=3D0x7fffffffc278= ) at bytecode.c:919 #35 0x0000000000590e39 in funcall_lambda (fun=3D17986093, nargs=3D1, arg_vector=3D0x7fffffffc270) at eval.c:2983 #36 0x0000000000590b45 in apply_lambda (fun=3D17986093, args=3D17246278) at eval.c:2924 #37 0x000000000058f191 in eval_sub (form=3D17246438) at eval.c:2230 #38 0x00000000005c0a79 in readevalloop (readcharfun=3D17665045, stream=3D= 0x0, sourcename=3D13097937, printflag=3Dfalse, unibyte=3D12966770, readfun=3D12966770, start=3D12966770, end=3D12966770) at lread.c:1934 #39 0x00000000005c0d4f in Feval_buffer (buffer=3D17665045, printflag=3D12966770, filename=3D16200945, unibyte=3D12966770, do_allow_print=3D12966818) at lread.c:1995 #40 0x0000000000590702 in Ffuncall (nargs=3D6, args=3D0x7fffffffc5e8) at eval.c:2831 #41 0x00000000005d9ecb in exec_byte_code (bytestr=3D9101593, vector=3D910= 1629, maxdepth=3D24, args_template=3D12966770, nargs=3D0, args=3D0x0) at bytecode.c:919 #42 0x0000000000591224 in funcall_lambda (fun=3D9101469, nargs=3D4, arg_vector=3D0x8ae13d ) at eval.c:3049 #43 0x0000000000590828 in Ffuncall (nargs=3D5, args=3D0x7fffffffcb80) at eval.c:2864 #44 0x00000000005900a9 in call4 (fn=3D13233138, arg1=3D16200945, arg2=3D1= 6200945, arg3=3D12966770, arg4=3D12966818) at eval.c:2663 #45 0x00000000005bf0ce in Fload (file=3D12968289, noerror=3D12966770, nomessage=3D12966818, nosuffix=3D12966770, must_suffix=3D12966770) at lread.c:1305 #46 0x0000000000590702 in Ffuncall (nargs=3D4, args=3D0x7fffffffcf18) at eval.c:2831 #47 0x00000000005d9ecb in exec_byte_code (bytestr=3D9509777, vector=3D950= 9813, maxdepth=3D92, args_template=3D1028, nargs=3D1, args=3D0x7fffffffd468= ) at bytecode.c:919 #48 0x0000000000590e39 in funcall_lambda (fun=3D9509733, nargs=3D1, arg_vector=3D0x7fffffffd460) at eval.c:2983 #49 0x0000000000590828 in Ffuncall (nargs=3D2, args=3D0x7fffffffd458) at eval.c:2864 #50 0x00000000005d9ecb in exec_byte_code (bytestr=3D9483993, vector=3D948= 4029, maxdepth=3D68, args_template=3D0, nargs=3D0, args=3D0x7fffffffd9f8) at bytecode.c:919 #51 0x0000000000590e39 in funcall_lambda (fun=3D9483949, nargs=3D0, arg_vector=3D0x7fffffffd9f8) at eval.c:2983 #52 0x0000000000590828 in Ffuncall (nargs=3D1, args=3D0x7fffffffd9f0) at eval.c:2864 #53 0x00000000005d9ecb in exec_byte_code (bytestr=3D9480481, vector=3D948= 0517, maxdepth=3D48, args_template=3D0, nargs=3D0, args=3D0x7fffffffded0) at bytecode.c:919 #54 0x0000000000590e39 in funcall_lambda (fun=3D9480437, nargs=3D0, arg_vector=3D0x7fffffffded0) at eval.c:2983 #55 0x0000000000590b45 in apply_lambda (fun=3D9480437, args=3D12966770) at eval.c:2924 #56 0x000000000058f191 in eval_sub (form=3D13213110) at eval.c:2230 #57 0x000000000058e66c in Feval (form=3D13213110, lexical=3D12966770) at eval.c:2003 #58 0x00000000004eb0a4 in top_level_2 () at keyboard.c:1183 #59 0x000000000058ccfd in internal_condition_case ( bfun=3D0x4eb087 , handlers=3D13017586, hfun=3D0x4eab6d ) at eval.c:1354 #60 0x00000000004eb0de in top_level_1 (ignore=3D12966770) at keyboard.c:1= 191 #61 0x000000000058c181 in internal_catch (tag=3D13013522, func=3D0x4eb0a6 , arg=3D12966770) at eval.c:1118 #62 0x00000000004eaffd in command_loop () at keyboard.c:1152 #63 0x00000000004ea678 in recursive_edit_1 () at keyboard.c:777 #64 0x00000000004ea85d in Frecursive_edit () at keyboard.c:845 #65 0x00000000004e8748 in main (argc=3D5, argv=3D0x7fffffffe3a8) at emacs= =2Ec:1654 Lisp Backtrace: "Automatic GC" (0xc51790) 0x1bf8068 PVEC_COMPILED 0x1bc0230 PVEC_COMPILED "funcall" (0xffff9920) "byte-compile-from-buffer" (0xffffa0f0) "byte-compile-file" (0xffffa670) "byte-recompile-file" (0xffffabb8) 0x112c3c8 PVEC_COMPILED 0x117a800 PVEC_COMPILED "funcall" (0xffffb5f0) "byte-recompile-directory" (0xffffbdd8) "byte-force-recompile" (0xffffc270) "eval-buffer" (0xffffc5f0) "load-with-code-conversion" (0xffffcb88) "load" (0xffffcf20) "command-line-1" (0xffffd460) "command-line" (0xffffd9f8) "normal-top-level" (0xffffded0) --CrRGoDVqg6eqe4uhgqBgG4cEAgsTUJKn7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTPRPiAAoJEMAaIROpHW7IoLIQAJveV6ywCgVwQ0cO6CpDN2xJ chrRO5pFefGmN1Unl7LEm/GhrSd8+8oiPdop7ni5Tto6xts2wo98m+xh6OmIA6hY bxpjxL/qTadmXIpixUwQT7sKsEpWHRnFVZ75gBZHdd8DEXl9r+UDzu5Oq+nN7+iK 7OfwTIXQqD/UeRrWauhLXDDsrLazEnlaN8qXnUaC6v4mTsEe8JoBUCzOf40KHZgb jbrjSZ2q4wY6kSCSebVM4Im5lD2k0kF7g4shWlZLr5djpXijlyXWzhX/MY78Vvtl n6gamGYJMrSVFlvx5srcSJ7iXyfSsDQDW346Qa28XfE5h2IScMwBkCLWQGG86FMC oYutCisYdEUnheVjDRbfbC99z08HetOUuS620XnsIoJaZaEbMTeREdq08pku0tnS to8MLhUPzHYHMGO2eXXCMs5b0v0oOs6lurlwvh0L8t0LgzSuhNJaZ3YrrILLQ9Oz kzfT72IDIPC/7FSW8/sEiDgD4CIk6GvYH++4/Bg9xAzEzeVOvpaTJyPr+DtEEWZh KIzRDr+yJMu5kOurBXNkWkP2IjTplGKIhKaclAlS0X85FIExVf22CKzxXGUDOEOu UMl4uHCnnMFBirzQbzhOCDLIvTCsxaTTT5kPW+/n3gGhtN9pMoJ8MNFl7TycYyCo bIsq81VbvYs61dxelIxO =4gXW -----END PGP SIGNATURE----- --CrRGoDVqg6eqe4uhgqBgG4cEAgsTUJKn7--