From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Calling Lisp from undo.c's record_* functions Date: Tue, 17 Nov 2015 18:40:05 +0200 Message-ID: <838u5wbmvu.fsf@gnu.org> References: <83r3jpc2of.fsf@gnu.org> <87h9kkbz6k.fsf@russet.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1447778490 24688 80.91.229.3 (17 Nov 2015 16:41:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Nov 2015 16:41:30 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 17 17:41:21 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 1ZyjJo-0001Ra-El for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2015 17:41:20 +0100 Original-Received: from localhost ([::1]:59410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjJn-00064c-TC for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2015 11:41:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjIh-0004p0-BW for emacs-devel@gnu.org; Tue, 17 Nov 2015 11:40:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyjIe-0004yk-5E for emacs-devel@gnu.org; Tue, 17 Nov 2015 11:40:11 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:33656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjId-0004yW-TS for emacs-devel@gnu.org; Tue, 17 Nov 2015 11:40:08 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NXY00900WKPXV00@mtaout28.012.net.il> for emacs-devel@gnu.org; Tue, 17 Nov 2015 18:39:00 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXY009XUWX01110@mtaout28.012.net.il>; Tue, 17 Nov 2015 18:39:00 +0200 (IST) In-reply-to: <87h9kkbz6k.fsf@russet.org.uk> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 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:194652 Archived-At: > 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. > 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. > 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? 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? > 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.