On 21/05/04, 14:38:56, Kevin Atkinson <[EMAIL PROTECTED]> wrote regarding Re: 
[aspell-devel] Core dump, bus error, byte alignment, ObjStack:

> > A simple workaround which so far has allowed aspell to run is to modify
> > ObjStack alloc(size_t size) to align to a 4 byte boundary:

> But memory ineffect (in the case of very short strings).  Also won't work
> on 64 bit platforms.  Best to modify the above statement to:
>   WordData * b = (WordData *)buf.alloc(total_size, sizeof(void *));


Of course. The quick workaround is not the solution. The appropriate 
alloc call (with or without the alignment) is required throughout the 
code. Perhaps there aren't any more, seems to be working with just:

--- modules/speller/default/readonly_ws.cpp.orig        2004-05-12 
07:03:28.000000000 +0100
+++ modules/speller/default/readonly_ws.cpp     2004-05-21 15:44:32.630024000 
+0100
@@ -850,7 +850,7 @@
             return make_err(invalid_word, MsgConv(lang)(w),
                             _("The total word length, with soundslike 
data, is larger than 240 characters."));
 
-          WordData * b = (WordData *)buf.alloc(total_size);
+          WordData * b = (WordData *)buf.alloc(total_size, sizeof(void 
*));
           *prev = b;
           b->next = 0;
           prev = &b->next;




_______________________________________________
Aspell-devel mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/aspell-devel

Reply via email to