From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11519: "Wrong type argument: characterp" building custom-deps while boostrapping Date: Tue, 22 May 2012 15:19:12 -0400 Message-ID: References: <83d360yw48.fsf@gnu.org> <834nrazrtl.fsf@gnu.org> <831umez1p7.fsf@gnu.org> <83vcjpxw18.fsf@gnu.org> <83k404xcpt.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1337714488 29535 80.91.229.3 (22 May 2012 19:21:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 May 2012 19:21:28 +0000 (UTC) Cc: schwab@linux-m68k.org, 11519@debbugs.gnu.org, lekktu@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 22 21:21:26 2012 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 1SWue2-0004uJ-HX for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 May 2012 21:21:22 +0200 Original-Received: from localhost ([::1]:59831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWue1-0002uQ-Ps for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 May 2012 15:21:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWudz-0002tD-6D for bug-gnu-emacs@gnu.org; Tue, 22 May 2012 15:21:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWudx-0004Nf-9E for bug-gnu-emacs@gnu.org; Tue, 22 May 2012 15:21:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWudx-0004NY-5q for bug-gnu-emacs@gnu.org; Tue, 22 May 2012 15:21:17 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SWuef-0001HO-M5 for bug-gnu-emacs@gnu.org; Tue, 22 May 2012 15:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 May 2012 19:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11519 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11519-submit@debbugs.gnu.org id=B11519.13377144624825 (code B ref 11519); Tue, 22 May 2012 19:22:01 +0000 Original-Received: (at 11519) by debbugs.gnu.org; 22 May 2012 19:21:02 +0000 Original-Received: from localhost ([127.0.0.1]:39291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWudi-0001Ff-0G for submit@debbugs.gnu.org; Tue, 22 May 2012 15:21:02 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:41968) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWudf-0001FL-K6 for 11519@debbugs.gnu.org; Tue, 22 May 2012 15:21:00 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q4MJKDCg028423; Tue, 22 May 2012 15:20:13 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id D4E51D201C; Tue, 22 May 2012 15:19:12 -0400 (EDT) In-Reply-To: <83k404xcpt.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 22 May 2012 22:00:46 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4229=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4229> : streams <758285> : uri <1115422> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list 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:60287 Archived-At: > Note that the address of buffer text has changed from 0x10757948 to > 0x10826948. And the culprit is ... > #7 0x010397fb in xmalloc (size=786436) at alloc.c:727 > #8 0x0120da2d in load_charset_map_from_file (charset=0x1944970, > mapfile=57455953, control_flag=1) at charset.c:501 Huh! Indeed, I always assumed that relocation would be something that can only happen during GC, not in a mere xmalloc. > The marked line calls string_char, which calls maybe_unify_char, which > calls load_charset, which causes memory allocation and relocation of > buffer text. This brings up back to the issue of calling maybe_unify_char in STRING_CHAR_AND_LENGTH. One more strike against it. Handa, could you prepare a patch that removes this? > If you agree with the diagnosis, then how about the change below? Might be an acceptable workaround for the emacs-24 branch, yes (tho I'd replace "inhibit ? 0 : 1" with "!inhibit"). But is it really new in Emacs-24? It seems the same problem is already present in Emacs-23, so it's probably not so urgent to fix it for 24.1. > It fixes the problem for me. (Or is there a better way?) If accepted, I > will add the necessary commentary to this code and a prototype for the > new function. In any case, I suggest to install the fix on the > emacs-24 branch, because this issue is a disaster waiting to happen. I wonder: why do we use REL_ALLOC? Stefan