From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Calling Lisp from undo.c's record_* functions Date: Tue, 17 Nov 2015 21:13:00 +0000 Message-ID: <877flgmisj.fsf@russet.org.uk> References: <83r3jpc2of.fsf@gnu.org> <87h9kkbz6k.fsf@russet.org.uk> <838u5wbmvu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447796278 27979 80.91.229.3 (17 Nov 2015 21:37:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Nov 2015 21:37:58 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 17 22:37:49 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Zynwg-00056S-2q for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2015 22:37:46 +0100 Original-Received: from localhost ([::1]:60747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zynwf-0006H8-HL for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2015 16:37:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZynwL-0006Gd-Og for emacs-devel@gnu.org; Tue, 17 Nov 2015 16:37:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZynwK-0004Tl-NL for emacs-devel@gnu.org; Tue, 17 Nov 2015 16:37:25 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:37118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZynwG-0004T0-0m; Tue, 17 Nov 2015 16:37:20 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1ZynwE-0002zk-Ev; Tue, 17 Nov 2015 21:37:18 +0000 Original-Received: from cpc6-benw10-2-0-cust45.gate.cable.virginm.net ([92.238.179.46] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1ZynwE-00058R-El; Tue, 17 Nov 2015 21:37:18 +0000 In-Reply-To: <838u5wbmvu.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Nov 2015 18:40:05 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194671 Archived-At: Eli Zaretskii writes: >> From: phillip.lord@russet.org.uk (Phillip Lord) >> Cc: Eli Zaretskii , >> Date: Tue, 17 Nov 2015 12:14:27 +0000 >> >> I've pushed an unfinished fix to fix/segfault-from-run-undoable-change > > Thanks. That potential fix is finished now. It seems to work (in terms of functionality) but I can't assess whether it fixes the segfault. >> I'm pretty sure my implementation in C could be simpler. I wasn't sure >> how to get from the current-buffer variable in C, to the Lisp_Object > > See XSETBUFFER. Thanks! > >> The second part of the plan is to change simple.el to use a idle timer, >> as I suggested yesterday. I'll do that later today. > > What does that timer do? The timer is an emergency backstop for circumstances when Emacs is making undoable changes but commands are not happening. Obvious circumstances for this would be Emacs with a process buffer. > Would it work to have a non-idle timer that is started once at > startup, and then never shut down, and have its job be put on some > list that the timer will examine? Yes, but it's wasteful. >> At the moment, I can't replicate the problem, though. > > The crash happened for me when the build ran this command in > admin/grammars/: > > EMACSLOADPATH= "../../src/emacs.exe" -batch --no-site-file --no-site-lisp -l > semantic/wisent/grammar -f wisent-batch-make-parser -o > "../../lisp/cedet/semantic/wisent/python-wy.el" python.wy > > Try it, maybe it will happen to you as well. The crash is elusive > (naturally, since it depends on how much consing was done before > that). It happened to me in a 32-bit build with wide ints, but not > without wide ints. Also, the build was optimized (-O2), so maybe > that, too, is a prerequisite for reproducing. I'm not running on w32, unfortunately. I tried: EMACSLOADPATH= "../../src/emacs" -batch --no-site-file --no-site-lisp -l semantic/wisent/grammar -f wisent-batch-make-parser -o "../../lisp/cedet/semantic/wisent/python-wy.el" python.wy which works fine.