#34456 [Ver->Csd]: [PATCH] pspell extension segfaults with aspell 0.50.x
| From: | iliaa@php.net | Date: | Mon, 12 Sep 2005 16:35:18 +0000 |
| Subject: | #34456 [Ver->Csd]: [PATCH] pspell extension segfaults with aspell 0.50.x | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84941@lists.php.net to get a copy of this message | ||
ID: 34456
Updated by: iliaa@php.net
Reported By: nlopess@php.net
-Status: Verified
+Status: Closed
Bug Type: Pspell related
Operating System: *
PHP Version: 5CVS-2005-09-10 (CVS)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-09-12 08:44:55] sniper@php.net
It crashes for me too. I also have (a|p)spell 0.50.5
------------------------------------------------------------------------
[2005-09-11 20:25:28] nlopess@php.net
I've tested with aspell 0.50.5 and it produces the following (without
my patch):
http://mega.ist.utl.pt/~ncpl/php_aspell_valgrind.txt
http://mega.ist.utl.pt/~ncpl/php_aspell_gdb.txt
My patch fixes these problems. And it makes sense. PHP is passing a
Speller* pointer, where it should be passing a Config* to
pspell_manager_config().
I've "wasted" a couple of hours tracking down this bug in the aspell
sources, and I think that this bug might not happen in all setups,
depending on the compiler (because of some magic C++ upcasting).
------------------------------------------------------------------------
[2005-09-11 19:07:06] iliaa@php.net
I've used pspell extensively with 0.5 lib and never seen a crash
pertaining to the demonstrate code.
------------------------------------------------------------------------
[2005-09-10 14:49:02] nlopess@php.net
Description:
------------
The pspell extension segfaults with (at least) aspell 0.50.x. Although
aspell 0.60.x doesn't, there is a problem in PHP code.
Patch: http://mega.ist.utl.pt/~ncpl/php_pspell_patch.txt
Reproduce code:
---------------
all pspell_config_xx() segfault.
<?
$p=pspell_new('en');
pspell_config_mode($p, PSPELL_FAST);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34456&edit=1