From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.bugs Subject: bug#17168: 24.3.50; Segfault at mark_object Date: Thu, 03 Apr 2014 10:59:50 +0400 Message-ID: <533D06E6.2060001@yandex.ru> References: <87y4zop44m.fsf@yahoo.fr> <533C3AF5.6070502@yandex.ru> <533C6905.9060309@dancol.org> <83bnwjbh8v.fsf@gnu.org> <533C75A6.60900@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050401080701070809060504" X-Trace: ger.gmane.org 1396520583 28613 80.91.229.3 (3 Apr 2014 10:23:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Apr 2014 10:23:03 +0000 (UTC) Cc: theonewiththeevillook@yahoo.fr To: 17168@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 03 12:22:56 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 1WVeID-00075K-1Z for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Apr 2014 11:50:41 +0200 Original-Received: from localhost ([::1]:42226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVbdR-0002dP-0W for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Apr 2014 03:00:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVbdD-000267-MK for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 03:00:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVbd6-0006wo-LH for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 03:00:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVbd6-0006w7-H5 for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 03:00:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WVbd5-0006eX-93 for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 03:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Apr 2014 07:00:03 +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.139650839825528 (code B ref 17168); Thu, 03 Apr 2014 07:00:03 +0000 Original-Received: (at 17168) by debbugs.gnu.org; 3 Apr 2014 06:59:58 +0000 Original-Received: from localhost ([127.0.0.1]:33662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVbcz-0006de-Hm for submit@debbugs.gnu.org; Thu, 03 Apr 2014 02:59:58 -0400 Original-Received: from forward8l.mail.yandex.net ([84.201.143.141]:54183) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVbcv-0006dR-S9 for 17168@debbugs.gnu.org; Thu, 03 Apr 2014 02:59:55 -0400 Original-Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [84.201.187.145]) by forward8l.mail.yandex.net (Yandex) with ESMTP id 90E4E1A40E2E; Thu, 3 Apr 2014 10:59:51 +0400 (MSK) Original-Received: from smtp2h.mail.yandex.net (localhost [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id EFE891703F20; Thu, 3 Apr 2014 10:59:50 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id fBDtCJCLH2-xoFO2IhX; Thu, 3 Apr 2014 10:59:50 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 35abbbae-0cb8-44d6-a5b9-195cb108748a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1396508390; bh=zWiiklPV+C46Xvu2KabIefyxNxLH7QPzEWEtq126mBE=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=eJxgZ7z9NVuHT81UoUaK+njpYMW6bpShOJGDBeJIM5f1+M91RKnlIMJZYNSGkwGTk MH3DHiQl5sULkNeSKYwMFxrnrsq9bIrqn2jRauL+PgF59hpkodmjxbP1DJXcGtUDYE r5SivVUH37fFMjCBjxlsZ/0kGc6rmW7RNvUUpugY= Authentication-Results: smtp2h.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <533C75A6.60900@dancol.org> 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:87621 Archived-At: This is a multi-part message in MIME format. --------------050401080701070809060504 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hopefully I found the way to catch bogus object in 'function' slot of a Lisp_Symbol. 100% reproducible for me, as of bzr revision 116934. 1. Apply this patch. 2. Compile with -O0 -g3 and --enable-checking. 3. Run 'emacs -Q', then M-x byte-force-recompile /path/to/trunk/lis/org 4. Crash ==> #0 0x000000379220f62b in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37 #1 0x0000000000569aff in terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at ../../trunk/src/emacs.c:382 #2 0x00000000005f089a in die ( msg=0x70f498 "SYMBOLP (sym->s.function) || CONSP (sym->s.function) || COMPILEDP (sym->s.function) || SUBRP (sym->s.function)", file=0x70e420 "../../trunk/src/alloc.c", line=6613) at ../../trunk/src/alloc.c:6913 #3 0x00000000005f00b5 in sweep_symbols () at ../../trunk/src/alloc.c:6610 #4 0x00000000005f03bb in gc_sweep () at ../../trunk/src/alloc.c:6735 #5 0x00000000005ede1e in Fgarbage_collect () at ../../trunk/src/alloc.c:5632 #6 0x0000000000567706 in maybe_gc () at ../../trunk/src/lisp.h:4520 #7 0x000000000065b95f in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=2, args=0x7fff66de7f70) at ../../trunk/src/bytecode.c:954 [...next frames probably irrelevant...] Dmitry --------------050401080701070809060504 Content-Type: text/x-patch; name="bug17168_bogus_function_eassert.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bug17168_bogus_function_eassert.patch" === modified file 'src/alloc.c' --- src/alloc.c 2014-04-03 00:37:51 +0000 +++ src/alloc.c 2014-04-03 06:42:53 +0000 @@ -6174,6 +6174,11 @@ break; CHECK_ALLOCATED_AND_LIVE (live_symbol_p); ptr->gcmarkbit = 1; + /* Attempt to catch bogus objects. */ + eassert (SYMBOLP (ptr->function) + || CONSP (ptr->function) + || COMPILEDP (ptr->function) + || SUBRP (ptr->function)); mark_object (ptr->function); mark_object (ptr->plist); switch (ptr->redirect) @@ -6601,6 +6606,11 @@ if (!pure_p) eassert (!STRING_MARKED_P (XSTRING (sym->s.name))); sym->s.gcmarkbit = 0; + /* Attempt to catch bogus objects. */ + eassert (SYMBOLP (sym->s.function) + || CONSP (sym->s.function) + || COMPILEDP (sym->s.function) + || SUBRP (sym->s.function)); } } --------------050401080701070809060504--