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#11519: "Wrong type argument: characterp" building custom-deps while boostrapping Date: Wed, 23 May 2012 05:59:41 +0300 Message-ID: <83ehqby542.fsf@gnu.org> References: <83d360yw48.fsf@gnu.org> <834nrazrtl.fsf@gnu.org> <831umez1p7.fsf@gnu.org> <83vcjpxw18.fsf@gnu.org> <83k404xcpt.fsf@gnu.org> <83hav8xak1.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1337742029 26832 80.91.229.3 (23 May 2012 03:00:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 May 2012 03:00:29 +0000 (UTC) Cc: schwab@linux-m68k.org, 11519@debbugs.gnu.org, lekktu@gmail.com To: Stefan Monnier , Richard Stallman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 23 05:00:27 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 1SX1oE-0008Kd-An for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 May 2012 05:00:22 +0200 Original-Received: from localhost ([::1]:60232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX1oD-0007P9-TF for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 May 2012 23:00:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX1oB-0007Os-1w for bug-gnu-emacs@gnu.org; Tue, 22 May 2012 23:00:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX1o9-0001rC-0I for bug-gnu-emacs@gnu.org; Tue, 22 May 2012 23:00:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58270) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX1o8-0001qh-Rm for bug-gnu-emacs@gnu.org; Tue, 22 May 2012 23:00:16 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SX1os-00051r-4a for bug-gnu-emacs@gnu.org; Tue, 22 May 2012 23:01: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: Wed, 23 May 2012 03:01: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.133774204519310 (code B ref 11519); Wed, 23 May 2012 03:01:01 +0000 Original-Received: (at 11519) by debbugs.gnu.org; 23 May 2012 03:00:45 +0000 Original-Received: from localhost ([127.0.0.1]:39583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SX1ob-00051O-22 for submit@debbugs.gnu.org; Tue, 22 May 2012 23:00:45 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:44522) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SX1oF-00050p-JS for 11519@debbugs.gnu.org; Tue, 22 May 2012 23:00:43 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M4G00N00G931V00@a-mtaout22.012.net.il> for 11519@debbugs.gnu.org; Wed, 23 May 2012 05:59:30 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M4G00NOSGB61K00@a-mtaout22.012.net.il>; Wed, 23 May 2012 05:59:30 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il 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:60292 Archived-At: > From: Stefan Monnier > Cc: handa@gnu.org, schwab@linux-m68k.org, lekktu@gmail.com, 11519@debbugs.gnu.org > Date: Tue, 22 May 2012 20:47:54 -0400 > > I assume that the problem can show up in many other places than > re_search, so yes, it's a real problem that we need to fix for real, but > your workaround will only fix the problem we happened to bump into Which other places use C pointers to buffer text and call functions that can allocate memory? If you know about such places, please point them out. I don't think we have them, but that's me. > adding this fix to the emacs-24 branch may be completely useless if this > bug never shows up at that place there. That "if" is profoundly false, as I can now easily craft a use case where it _will_ show up. Anyway, are you against committing this to the release branch? I'd be very sad if you were, having invested so much time in hunting this bug, but I guess I'll survive. > >> I wonder: why do we use REL_ALLOC? > > AFAIK, we do that only on platforms that don't support mmap for > > allocating buffer text. > > So, IIUC the only reason to use it is so that we can more often return > memory to the OS even for the non-mmap case? Is that because returning > memory can only be done via sbrk style memory management? I don't think this is only about _returning_ memory. It is first and foremost about not _asking_ for more memory when we can come up with it by reshuffling buffer text. > I wonder how effective it is in practice. I have no idea. ralloc.c was in place (and used by all platforms) long before I became involved with Emacs. Perhaps Richard can tell.