emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.60; Can't start emacs when filename contains national character


From: Sven Joachim
Subject: Re: 23.0.60; Can't start emacs when filename contains national character
Date: Sat, 29 Mar 2008 13:21:18 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2.50 (gnu/linux)

On 2008-03-29 12:23 +0100, Eli Zaretskii wrote:

> It looks like this is happening because expand-file-name calls egetenv
> to expand "~", but egetenv returns a unibyte string, while
> expand-file-name is not prepared for this, because it makes up its
> mind about multibyteness of the file name too early.
>
> Unless I'm missing something, the same should happen on Unix as well.
> Could someone try this on Unix or GNU system with HOME set to a
> directory with non-ASCII characters, and see if Emacs crashes there as
> well?  (This is important for me to know whether to prepare a
> Windows-only change or a change that should fix all systems.)

I've tested that.  If the directory contains a non-ASCII character,
Emacs crashes on GNU/Linux as well:

(gdb) bt
#0  abort () at emacs.c:430
#1  0x080bccb5 in multibyte_chars_in_text (ptr=0xbfe8400c "\344h", nbytes=14) 
at character.c:616
#2  0x0816c9c6 in make_specified_string (contents=0xbfe84000 
"/home/sven/b\344h", nchars=-1, nbytes=14, multibyte=1)
    at alloc.c:2446
#3  0x0814651d in Fexpand_file_name (name=136391979, 
default_directory=148045091) at fileio.c:1723
#4  0x081823a2 in Ffuncall (nargs=2, args=0xbfe84108) at eval.c:3028
#5  0x081abe4c in Fbyte_code (bytestr=136391731, vector=136391748, 
maxdepth=<value optimized out>) at bytecode.c:679
#6  0x08181d24 in funcall_lambda (fun=136391692, nargs=1, 
arg_vector=0xbfe84244) at eval.c:3212
#7  0x0818213f in Ffuncall (nargs=2, args=0xbfe84240) at eval.c:3082
#8  0x081abe4c in Fbyte_code (bytestr=136470267, vector=136470284, 
maxdepth=<value optimized out>) at bytecode.c:679
#9  0x08181d24 in funcall_lambda (fun=136470244, nargs=0, 
arg_vector=0xbfe84310) at eval.c:3212
#10 0x08181f20 in apply_lambda (fun=136470244, args=137743641, eval_flag=1) at 
eval.c:3136
#11 0x081815d4 in Feval (form=138225021) at eval.c:2416
#12 0x0811dbf3 in top_level_2 () at keyboard.c:1379
#13 0x08180c60 in internal_condition_case (bfun=0x811dbe0 <top_level_2>, 
handlers=137786737, hfun=0x8122510 <cmd_error>)
    at eval.c:1494
#14 0x08121930 in top_level_1 () at keyboard.c:1387
#15 0x08180d3a in internal_catch (tag=137782737, func=0x8121900 <top_level_1>, 
arg=137743641) at eval.c:1230
#16 0x08122359 in command_loop () at keyboard.c:1342
#17 0x081226db in recursive_edit_1 () at keyboard.c:958
#18 0x08122811 in Frecursive_edit () at keyboard.c:1020
#19 0x081171ec in main (argc=1, argv=0xbfe849c4) at emacs.c:1784

Lisp Backtrace:
"expand-file-name" (0xbfe8410c)
"abbreviate-file-name" (0xbfe84244)
"normal-top-level" (0xbfe84310)
(gdb) 

The crash does not happen with a UTF-8 encoded non-ASCII character.

Sven




reply via email to

[Prev in Thread] Current Thread [Next in Thread]