From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: branch master segfault (2019-02-05) Date: Wed, 06 Feb 2019 21:46:48 +0200 Message-ID: <83h8dgsnrr.fsf@gnu.org> References: <83ftt2tc0e.fsf@gnu.org> <83y36ssyzq.fsf@gnu.org> <83o97osw6j.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="27266"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Philippe Vaucher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 06 20:47:59 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grTAt-0006x6-Cp for ged-emacs-devel@m.gmane.org; Wed, 06 Feb 2019 20:47:59 +0100 Original-Received: from localhost ([127.0.0.1]:57656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grTAs-0003jh-D1 for ged-emacs-devel@m.gmane.org; Wed, 06 Feb 2019 14:47:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grT9s-0003i4-Qa for emacs-devel@gnu.org; Wed, 06 Feb 2019 14:46:57 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grT9s-0004P2-Ng; Wed, 06 Feb 2019 14:46:56 -0500 Original-Received: from [176.228.60.248] (port=4942 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1grT9s-0002Ip-AL; Wed, 06 Feb 2019 14:46:56 -0500 In-reply-to: (message from Philippe Vaucher on Wed, 6 Feb 2019 20:00:45 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233061 Archived-At: > From: Philippe Vaucher > Date: Wed, 6 Feb 2019 20:00:45 +0100 > Cc: Emacs developers > > silex@silex-laptop:~$ docker run -it --rm silex/emacs:master locale > LANG= > LANGUAGE= > LC_CTYPE="POSIX" > LC_NUMERIC="POSIX" > LC_TIME="POSIX" > LC_COLLATE="POSIX" > LC_MONETARY="POSIX" > LC_MESSAGES="POSIX" > LC_PAPER="POSIX" > LC_NAME="POSIX" > LC_ADDRESS="POSIX" > LC_TELEPHONE="POSIX" > LC_MEASUREMENT="POSIX" > LC_IDENTIFICATION="POSIX" > LC_ALL= > ``` That's it: this is the "C" locale, without any codeset being declared by any of these variables. > Out of curiosity I might investigate why this happens, but maybe there lies some unharmful bug in emacs > there that went unnoticed for long because `safe_terminal_coding` just works. There's no bug, AFAICT. When Emacs finds that the locale's codeset doesn't do any encoding, it uses safe_terminal_coding. The comments near the code which was segfaulting say that much. safe_terminal_coding is a coding-system that can handle any character "safely". > Is all the detection happening in `setup_coding_system`? Which detection did you have in mind? There's no detection inside setup_coding_system, but to answer your question more fully, I'd like to understand what exactly are you asking about. If you are asking about where does Emacs take the terminal encoding, then this is set up according to the locale, see set-locale-environment. If you want to look into this, I'd start by figuring out why you have the POSIX (a.k.a. "C") locale in the docker.