GNU bug report logs - #11519
"Wrong type argument: characterp" building custom-deps while boostrapping

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Sat, 19 May 2012 16:12:02 UTC

Severity: normal

Found in version 24.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, Richard Stallman <rms <at> gnu.org>
Cc: handa <at> gnu.org, schwab <at> linux-m68k.org, 11519 <at> debbugs.gnu.org, lekktu <at> gmail.com
Subject: bug#11519: "Wrong type argument: characterp" building custom-deps while boostrapping
Date: Wed, 23 May 2012 05:59:41 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: handa <at> gnu.org,  schwab <at> linux-m68k.org,  lekktu <at> gmail.com,  11519 <at> 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.




This bug report was last modified 11 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.