all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: /srv/bzr/emacs/trunk r107337: Protect fileio.c primitives against invalid file handler return values.
       [not found] <E1Rz3pU-00020m-C6@vcs.savannah.gnu.org>
@ 2012-02-20  1:29 ` Leo
  2012-02-20  2:02   ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Leo @ 2012-02-20  1:29 UTC (permalink / raw)
  To: emacs-devel

Thank you for fixing the crash.

On 2012-02-19 17:58 +0800, Chong Yidong wrote:
> +      error ("Invalid handler in `file-name-handler-alist'");

By looking at the doc-string of file-name-handler-alist, it seems
'("asdf" . ignore) is perfectly legitimate. Why is it invalid?

Thanks,
Leo




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: /srv/bzr/emacs/trunk r107337: Protect fileio.c primitives against invalid file handler return values.
  2012-02-20  1:29 ` /srv/bzr/emacs/trunk r107337: Protect fileio.c primitives against invalid file handler return values Leo
@ 2012-02-20  2:02   ` Chong Yidong
  2012-02-20  2:30     ` Leo
  2012-02-20  3:39     ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Chong Yidong @ 2012-02-20  2:02 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

> Thank you for fixing the crash.
>
> On 2012-02-19 17:58 +0800, Chong Yidong wrote:
>> +      error ("Invalid handler in `file-name-handler-alist'");
>
> By looking at the doc-string of file-name-handler-alist, it seems
> '("asdf" . ignore) is perfectly legitimate. Why is it invalid?

This is explained in more detail in (elisp)Magic File Names:

  The handler function must handle all of the above operations, and
  possibly others to be added in the future.  It need not implement all
  these operations itself--when it has nothing special to do for a
  certain operation, it can reinvoke the primitive, to handle the
  operation "in the usual way."  It should always reinvoke the primitive
  for an operation it does not recognize.

If the handler function returns an object of the wrong type, and that is
not caught, Emacs is liable to crash if that return value is used in C
code.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: /srv/bzr/emacs/trunk r107337: Protect fileio.c primitives against invalid file handler return values.
  2012-02-20  2:02   ` Chong Yidong
@ 2012-02-20  2:30     ` Leo
  2012-02-20  3:39     ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Leo @ 2012-02-20  2:30 UTC (permalink / raw)
  To: emacs-devel

On 2012-02-20 10:02 +0800, Chong Yidong wrote:
> If the handler function returns an object of the wrong type, and that is
> not caught, Emacs is liable to crash if that return value is used in C
> code.

Thank you.

Leo




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: /srv/bzr/emacs/trunk r107337: Protect fileio.c primitives against invalid file handler return values.
  2012-02-20  2:02   ` Chong Yidong
  2012-02-20  2:30     ` Leo
@ 2012-02-20  3:39     ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2012-02-20  3:39 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Leo, emacs-devel

> If the handler function returns an object of the wrong type, and that is
> not caught, Emacs is liable to crash if that return value is used in C
> code.

Note that such a crash would denote a bug in the C code (triggered by
a bug in the file-handler, of course, but a separate bug nevertheless).


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-20  3:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1Rz3pU-00020m-C6@vcs.savannah.gnu.org>
2012-02-20  1:29 ` /srv/bzr/emacs/trunk r107337: Protect fileio.c primitives against invalid file handler return values Leo
2012-02-20  2:02   ` Chong Yidong
2012-02-20  2:30     ` Leo
2012-02-20  3:39     ` Stefan Monnier

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.