GNU bug report logs - #38
No coding system used for environment variables

Previous Next

Package: emacs;

Reported by: Jason Rumney <jasonr <at> gnu.org>

Date: Wed, 5 Mar 2008 00:30:03 UTC

Severity: normal

Found in versions 22.2, 23.0.60

Done: Jason Rumney <jasonr <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #21 received at 38 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: Jason Rumney <jasonr <at> gnu.org>
Cc: Göran Uddeborg <goeran <at> uddeborg.se>,
        bug-gnu-emacs <at> gnu.org, 38 <at> debbugs.gnu.org
Subject: Re: No coding system used for environment variables
Date: Wed, 05 Mar 2008 18:16:45 +0900
>>>>> On Wed, 05 Mar 2008 08:57:31 +0000, Jason Rumney <jasonr <at> gnu.org> said:

> YAMAMOTO Mitsuharu wrote:
>> 2008-03-05 Jason Rumney <jasonr <at> gnu.org> * fileio.c
>> (Fexpand_file_name): Decode home directory names.
>> (Fsubstitute_in_file_name): Decode substituted variables.
>> 
>> But I'd strongly suggest to revert this changes at this timing of
>> pretest for upcoming Emacs 22.2.

> It fixes a serious bug. Users with non-ASCII names in their user
> names get strange behaviour of filename expansion.

I know, but your patch has a serious problem and leads to regression.

>> First, some coding systems are not ready until some .elc files get
>> loaded (a chicken-and-egg problem).
>> 

> It should not present a chicken and egg problem, as no files are
> loaded during bootstrap that require expansion of ~ or environment
> variables.

I meant the startup of the dumped executable.  Users may set
EMACS_LOAD_PATH and so on.

>> Second, as DECODE_FILE causes GC and string compaction in general,
>> some variables such as `nm' in Fexpand_file_name may not point to
>> valid data after that.

> This is a problem on some systems that still do not support stack
> marking for GC protection of such variables. But I think this bug is
> important enough to fix those problems rather than revert the patch.

Relocation of string data caused by GC has nothing to do with
(semi-obsolete) GCPROs.  Believe me, it causes a real problem.

>> You may also want to see a related patch in
>> http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-05/msg00115.html
>> 

> Was there a problem with that patch? Why was it not installed at the time?

Because no expert in this area made a response about the patch.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp




This bug report was last modified 15 years and 244 days ago.

Previous Next


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