all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carsten Bormann <cabo@tzi.org>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: 15570@debbugs.gnu.org
Subject: bug#15570: 24.3.50; Null pointer crash in (ns-convert-utf8-nfd-to-nfc "\377")
Date: Wed, 9 Oct 2013 20:33:06 +0200	[thread overview]
Message-ID: <D0D9A5EC-9E8E-46EE-BDFE-7323F8F60857@tzi.org> (raw)
In-Reply-To: <1FC6FC8B-68B0-4D93-8B5C-5665B843B2D0@swipnet.se>

On Oct 9, 2013, at 18:31, Jan Djärv <jan.h.d@swipnet.se> wrote:

> The function clearly expects valid UTF-8 as input.  Why is tramp feeding it invalid UTF-8?    What is tramp trying to accomplish?  What would be the expected return value on invalid UTF-8?

I haven't looked at the details yet (that will be easier once the null pointer reference is fixed).

That needn't stop me from hypothesizing...

ns-convert-utf8-nfd-to-nfc is used in places where system output might contain Apple's slightly crazy not-quite-NFD file names, so that you can usefully cut and paste them etc. to places that expect the usual not-quite-NFC.  So one should expect a lot of not-really-UTF-8-after-all input to be fed into this thing.
I'm presuming tramp just feeds whatever it got from the remote system through this to get more useful output e.g. for a directory listing.

It probably would be useful to have a robust version of this that just chokes on nothing.
Raising an error on non-UTF-8 input may be a desirable behavior in other places.
(Crashing Emacs never is.)

I'm a bit surprised that this bug apparently was around for a number of years already...

Grüße, Carsten






  parent reply	other threads:[~2013-10-09 18:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 11:37 bug#15570: 24.3.50; Null pointer crash in (ns-convert-utf8-nfd-to-nfc "\377") Carsten Bormann
2013-10-09 16:31 ` Jan Djärv
2013-10-09 16:57   ` Andreas Schwab
2013-10-09 17:06     ` Jan Djärv
2013-10-09 18:20       ` Stefan Monnier
2013-10-09 18:33   ` Carsten Bormann [this message]
2013-10-09 18:50     ` Jan Djärv
2013-10-09 21:03       ` Carsten Bormann

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

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

  git send-email \
    --in-reply-to=D0D9A5EC-9E8E-46EE-BDFE-7323F8F60857@tzi.org \
    --to=cabo@tzi.org \
    --cc=15570@debbugs.gnu.org \
    --cc=jan.h.d@swipnet.se \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.