From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#9943: 24.0.91; Abort in check_glyph_memory Date: Fri, 04 Nov 2011 11:12:13 +0200 Message-ID: <83ty6kl09e.fsf@gnu.org> References: <4EB25C0C.3060806@gmx.at> <834nylm3c3.fsf@gnu.org> <8339e4na27.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1320398018 19345 80.91.229.12 (4 Nov 2011 09:13:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Nov 2011 09:13:38 +0000 (UTC) Cc: 9943@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 04 10:13:34 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RMFq9-0005vw-Hb for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Nov 2011 10:13:33 +0100 Original-Received: from localhost ([::1]:40505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMFq9-0001VO-03 for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Nov 2011 05:13:33 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMFq6-0001VE-P7 for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2011 05:13:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMFq5-0002A5-AJ for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2011 05:13:30 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMFq5-00029h-4r for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2011 05:13:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RMFsY-0003JG-46 for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2011 05:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Nov 2011 09:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9943 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 9943-submit@debbugs.gnu.org id=B9943.132039810412651 (code B ref 9943); Fri, 04 Nov 2011 09:16:02 +0000 Original-Received: (at 9943) by debbugs.gnu.org; 4 Nov 2011 09:15:04 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMFrc-0003Hz-9V for submit@debbugs.gnu.org; Fri, 04 Nov 2011 05:15:04 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMFrZ-0003HM-9T for 9943@debbugs.gnu.org; Fri, 04 Nov 2011 05:15:02 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LU400900PAKQ100@a-mtaout22.012.net.il> for 9943@debbugs.gnu.org; Fri, 04 Nov 2011 11:12:09 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.228.70.69]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LU4009HQPK7P920@a-mtaout22.012.net.il>; Fri, 04 Nov 2011 11:12:09 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 04 Nov 2011 05:16:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:53501 Archived-At: > From: Stefan Monnier > Cc: Glenn Morris , 9943@debbugs.gnu.org > Date: Thu, 03 Nov 2011 20:35:04 -0400 > > > Thanks, I installed the same fix in xfns.c. > > All this code duplication is really a bore. We should really create > a new file (say "dispfns.c") where we can consolidate common code from > xfns, nsfns, and w32fns. I agree. How about filing a wishlist bug for that? > A good start would be that whenever we have to make the same fix at > all 3 places, we rearrange the code locally to call a new function > in dispfns.c which would receive the common part where the fix can > then be applied. The problem is that the code is similar, but different, with platform-specific fragments sprinkled all over. So refactoring it into a single implementation is not a trivial job. Making a function out of every common fragment is not the best idea, since it will typically depend on local and static variables and static functions. Quite to the opposite: extracting platform-specific snippets into functions with platform-specific implementation might be a better idea. Or not, it all depends on careful analysis that should be done as a prerequisite to deciding which way is better. So it's not an easy editing job, even if you want to approach this incrementally. I think it's rather a refactoring project that should be taken as a whole, or maybe as a few large sub-jobs.