[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspell-devel] Patch to fix segfaults on 64-bit arches
From: |
Brian Nelson |
Subject: |
Re: [aspell-devel] Patch to fix segfaults on 64-bit arches |
Date: |
Mon, 17 Mar 2003 19:33:28 -0800 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux) |
Kevin Atkinson <address@hidden> writes:
> The problem has nothing to do with it being 64-bit.
Yeah, but it seems to only manifest itself on 64-bit arches.
> I believe the problem is that it thinks '\0' is a space character.
>
> The ctype functions are nothing but trouble for parsing as they are
> locale dependent and perhaps arch depending as this case showed. The
> fix is very simple include "asc_ctype.hpp" and then use asc_isspace. I
> thought I replaced them all but apparently I missed this one.
I tried this and now it segfaults here:
(gdb) bt
#0 0x120009d2c in trim_wspace(char*) (str=0x120024322 "") at
../common/asc_ctype.hpp:16
#1 0x12000bde4 in pipe() () at aspell.cpp:524
#2 0x120007f18 in main (argc=4, argv=0x11ffffd28) at aspell.cpp:298
(gdb) list
11 #include "posib_err.hpp"
12
13 namespace acommon {
14
15 static inline bool asc_isspace(char c)
16 {
17 return c==' '|c=='\n'|c=='\r'|c=='\t'|c=='\f'|c=='\v';
18 }
19
20 static inline bool asc_isdigit(char c)
(gdb) print c
$1 = 718692352
--
I had no feelings about it. It was aloof and licked itself too much.
Like my cat Mr. Trotsky.