[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Segfault in Emacs 23 when attempting to insert a negative integer (was:
From: |
Lawrence Mitchell |
Subject: |
Segfault in Emacs 23 when attempting to insert a negative integer (was: Re: infloop in skeleton-insert) |
Date: |
Tue, 10 Apr 2007 14:42:34 +0100 |
User-agent: |
Mutt/1.5.10i |
Kenichi Handa wrote:
> In article <address@hidden>, Nick Roberts <address@hidden> writes:
>> It doesn't on Emacs 22:
>> (char-or-string-p -4)
>> t
>> and if it does on Emacs 23 then I think that must be the bug.
> Emacs 23 surely returns nil in that case. I think the
> behaviour of Emacs 22 is a bug (or at least very confusing).
> Don't people think OBJ can be safely used as an argument of
> a function that expects a character (e.g. insert,
> char-to-string) if (char-or-string-p OBJ) is true?
This also throws up a further problem in the Emacs 23 branch:
emacs -Q
M-: (insert -1) RET
resulting in a segmentation fault. The problem appears to lie in
the code-path to char_string(), the code does not seem to check to see
if the "character" to be inserted is valid: specifically, negative
arguments cause the stack to overflow (I think).
char_string(c, p) calls CHAR_STRING(c, p), which, since c is negative,
calls char_string(c, p) as a fallback.
I'm not sure how to go about fixing this, the naive approach of
calling CHECK_CHARACTER at the beginning of char_string results in a
segfault when building.
[...]
Cheers,
Lawrence
--
Lawrence Mitchell <address@hidden>
- Re: infloop in skeleton-insert, (continued)
- Re: infloop in skeleton-insert, martin rudalics, 2007/04/10
- Re: infloop in skeleton-insert, Kim F. Storm, 2007/04/10
- Re: infloop in skeleton-insert, Nick Roberts, 2007/04/10
- Re: infloop in skeleton-insert, Miles Bader, 2007/04/10
- Re: infloop in skeleton-insert, Nick Roberts, 2007/04/11
- Re: infloop in skeleton-insert, Miles Bader, 2007/04/11
- Re: infloop in skeleton-insert, Stefan Monnier, 2007/04/11
- Segfault in Emacs 23 when attempting to insert a negative integer (was: Re: infloop in skeleton-insert),
Lawrence Mitchell <=
- Re: Segfault in Emacs 23 when attempting to insert a negative integer (was: Re: infloop in skeleton-insert), Kenichi Handa, 2007/04/11
- Re: infloop in skeleton-insert, Stefan Monnier, 2007/04/10
Re: infloop in skeleton-insert, Leo, 2007/04/10