unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: schwab@linux-m68k.org, 11519@debbugs.gnu.org, lekktu@gmail.com
Subject: bug#11519: "Wrong type argument: characterp" building custom-deps while boostrapping
Date: Tue, 22 May 2012 22:47:26 +0300	[thread overview]
Message-ID: <83hav8xak1.fsf@gnu.org> (raw)
In-Reply-To: <jwv8vgkt4lc.fsf-monnier+emacs@gnu.org>

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Kenichi Handa <handa@gnu.org>, schwab@linux-m68k.org, lekktu@gmail.com,
>         11519@debbugs.gnu.org
> Date: Tue, 22 May 2012 15:19:12 -0400
> 
> > 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.

It happens in xmalloc/xrealloc when ralloc.c is used.

> > 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 wonder: why do we use REL_ALLOC?

AFAIK, we do that only on platforms that don't support mmap for
allocating buffer text.

The relocatable allocator makes a more efficient use of memory,
especially when it is almost full: it can potentially produce a large
block from several small ones by moving buffer text around to
"compact" their storage.





  reply	other threads:[~2012-05-22 19:47 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-19 16:10 bug#11519: "Wrong type argument: characterp" building custom-deps while boostrapping Juanma Barranquero
2012-05-19 16:27 ` Eli Zaretskii
2012-05-19 21:40   ` Juanma Barranquero
2012-05-20 17:27     ` Eli Zaretskii
2012-05-20 19:00       ` Juanma Barranquero
2012-05-21  1:50         ` Stefan Monnier
2012-05-21  2:51           ` Eli Zaretskii
2012-05-21  7:59             ` Andreas Schwab
2012-05-21 17:51               ` Eli Zaretskii
2012-05-21 20:39                 ` Stefan Monnier
2012-05-22 19:00                   ` Eli Zaretskii
2012-05-22 19:19                     ` Stefan Monnier
2012-05-22 19:47                       ` Eli Zaretskii [this message]
2012-05-23  0:47                         ` Stefan Monnier
2012-05-23  2:59                           ` Eli Zaretskii
2012-05-23 14:16                             ` Stefan Monnier
2012-05-23 15:23                               ` Ken Brown
2012-05-23 16:52                               ` Eli Zaretskii
2012-05-23 20:07                                 ` Stefan Monnier
2012-05-24 16:22                                   ` Eli Zaretskii
2012-05-28  2:15                                     ` Stefan Monnier
2012-05-28 16:53                                       ` Eli Zaretskii
2012-05-28 19:44                                         ` Stefan Monnier
2012-05-28 20:47                                           ` Eli Zaretskii
2012-05-29  1:23                                             ` Stefan Monnier
2012-05-29 16:02                                               ` Eli Zaretskii
2012-06-02 20:44                                                 ` Juanma Barranquero
2012-06-03  4:18                                                   ` Eli Zaretskii
2013-12-28  8:41                                                     ` Glenn Morris
2013-12-28  9:48                                                       ` Eli Zaretskii
2012-05-23 17:34                               ` Eli Zaretskii
2012-05-23 14:10                       ` Kenichi Handa
2012-05-23 15:27                         ` Stefan Monnier
2012-05-23 17:02                           ` Eli Zaretskii
2012-05-22 14:38                 ` Kenichi Handa
2012-05-22 19:02                   ` Eli Zaretskii
2012-05-21  1:49       ` Stefan Monnier
2012-05-21  2:50         ` Eli Zaretskii
2012-05-21  3:21           ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83hav8xak1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=11519@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).