From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems Date: Mon, 14 Feb 2022 16:07:10 +0200 Message-ID: <83h791pmnl.fsf@gnu.org> References: <83czjqrkew.fsf@gnu.org> <874k52kiu4.fsf@yahoo.com> <837d9yribj.fsf@gnu.org> <87v8xii83e.fsf@yahoo.com> <83r186p1h8.fsf@gnu.org> <878ruehx6n.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35875"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 14 15:36:23 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJcSl-00096I-AF for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Feb 2022 15:36:23 +0100 Original-Received: from localhost ([::1]:38670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJcSk-0006Rq-87 for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Feb 2022 09:36:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJc0l-00043d-7P for emacs-devel@gnu.org; Mon, 14 Feb 2022 09:07:27 -0500 Original-Received: from [2001:470:142:3::e] (port=59438 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJc0W-0003VU-TS; Mon, 14 Feb 2022 09:07:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=iYO3O4HFdTo4TjLn0SvFPWSG05Bfbv8bU2q3s73qLgs=; b=I6GXHS3dZ5eb 3GVUUPQ8wqT/eiWw8OkE2Kgkw88SJkcDnCLTL8dKdEJDQLwgkfXq4Kj1M97LHtqaWpJn1wbSNxiH4 2xTp0NfTBljLXj+pvUBMNCPvxNJGf7zXM/3n8jFOSfx7QxgYs12NbssUL5lwUXIEToFdZKTVcg4vd uj4yOGXKkLA4UUOtt5+8NZxyWJdAFKl3Sb6bhZrPM81qdeDobveOiZ2kUANkRZ8QGJ4NtA5Xg1Z/N vhwFfljzuTUI0gOmLO5S2KI4T2BUFiMhVKzRWXnk01x6wjGWDPJjd4Eo7F8OJpeQ6QxZBJpoGU3GM jBRJRYVV/esBbzbRLKUCCw==; Original-Received: from [87.69.77.57] (port=3638 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJc0U-000788-6C; Mon, 14 Feb 2022 09:07:11 -0500 In-Reply-To: <878ruehx6n.fsf@yahoo.com> (message from Po Lu on Mon, 14 Feb 2022 12:46:56 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286270 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Mon, 14 Feb 2022 12:46:56 +0800 > > Eli Zaretskii writes: > > > I'd rather we tried to decode it in any way possible. We never do > > anything like this anywhere else where decoding is involved. > > Thanks, could you point me to an example of decoding text "in any way > possible? I'm not sure how to do that inside C code. See DECODE_SYSTEM, for one simple example. Can you use that? > > I don't understand why. We do that in C in many places, see the calls > > to internal_condition_case and its ilk. Or am I missing something? > > I was under the impression that `internal_condition_case' could only be > called for Lisp functions, but that's evidently wrong. Yes, we use that for C functions as well.