Subject: Re: bug#11519: "Wrong type argument: characterp" building custom-deps while boostrapping

From: Stefan Monnier <[email-masked]>
Date: Tue, 22 May 2012 20:47:54 -0400

>> > 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.
> The problem is indeed not new, but so what?  It is real, and it just
> happened to us in real life, albeit on the trunk.  Who knows how many
> other problems which we dismiss as not reproducible could have been
> caused by this (especially when exotic character sets were involved)?

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, so
adding this fix to the emacs-24 branch may be completely useless if this
bug never shows up at that place there.

>> 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 wonder how effective it is in practice.

        Stefan