Subject: | aspell segfaulting when run under mod_perl |
Dear Bill,
I found Text::Aspell to segfault when run under mod_perl. I traced the
problem down to DESTROY method -- when I commented it out, apache
stopped segfaulting. I then replaced two occurences of safemalloc and
safefree with their regular equivalents (see the attached patch) and
things started to work.
I am not sure this is the best solution to the problem, because I do not
know *why* it fixed the problem (why are you using safe* functions?)
Note that this problem has been reported a couple of times before (see
the links below), but I could google no solution to this.
What are your thoughts on this?
Thank you,
- Dmitri.
Text::Aspell 0.05
Fedora Core 5
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
Perl v5.8.8 built for i386-linux-thread-multi
aspell 0.60.3-5
apache 2.2.0
mod_perl 2.0.2
http://lists.kuro5hin.org/pipermail/scoop-help/2003-May/001859.html
http://lists.kuro5hin.org/pipermail/scoop-help/2003-May.txt
Subject: | aspell.xs.patch.txt |
--- Aspell.xs.orig 2006-07-03 14:46:24.000000000 -0400
+++ Aspell.xs 2006-07-03 14:46:29.000000000 -0400
@@ -54,7 +54,7 @@
new(CLASS)
char *CLASS
CODE:
- RETVAL = (Aspell_object*)safemalloc( sizeof( Aspell_object ) );
+ RETVAL = (Aspell_object*)malloc( sizeof( Aspell_object ) );
if( RETVAL == NULL ){
warn("unable to malloc Aspell_object");
XSRETURN_UNDEF;
@@ -80,7 +80,7 @@
if ( self->speller )
delete_aspell_speller(self->speller);
- safefree( (char*)self );
+ free( (char*)self );
int