Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99312 - aspell extension segfaults
Summary: aspell extension segfaults
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-17 04:12 UTC by Nuno Lopes
Modified: 2005-11-21 21:42 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nuno Lopes 2005-07-17 04:12:48 UTC
PHP segfaults with aspell 0.50.5, so you need to stabilize aspell 0.60.3, 
which fixes the problem.

reference: http://sourceforge.net/tracker/?
func=detail&atid=100245&aid=1238839&group_id=245

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Nuno Lopes 2005-07-18 04:08:36 UTC
PHP bug report: http://bugs.php.net/33733
Comment 2 Sven 2005-07-20 14:51:42 UTC
There is a Version mistake in the portage,

-rw-r--r--  1 root root  328  1. Jan 2005  aspell-en-0.51.0.ebuild
-rw-r--r--  1 root root  328  1. Jan 2005  aspell-en-0.51.1.ebuild
-rw-r--r--  1 root root  343 20. Feb 11:39 aspell-en-6.0.0.ebuild ***

back to the future ;-)
Comment 3 Sven 2005-07-27 23:21:07 UTC
Version mistake is solved
Comment 4 Nuno Lopes 2005-08-12 03:56:54 UTC
CC PHP team, so that they make PHP dependent on aspell-0.60.x.
The segfaults happen at least with PHP 5.1 and aspell 0.50.5. I've not tested 
with other versions though.

simple reproduce script:
<?
$p=pspell_new('en');
pspell_config($p, PSPELL_FAST);
?>
Comment 5 Luca Longinotti (RETIRED) gentoo-dev 2005-08-25 17:02:09 UTC
Wrt comment #4, the PHP dependencies were fixed in the PHP overlay (link:
http://svn.gnqs.org/projects/gentoo-php-overlay/ ), it now depends on aspell
>=0.60. Best regards, CHTEKK.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2005-08-27 08:02:08 UTC
CCing arches as well.
Comment 7 Wormo (RETIRED) gentoo-dev 2005-08-28 00:40:22 UTC
won't stabilizing 0.60.* break aspell for all languages that don't have a new
enough dictionary (bug #96794)?
Comment 8 Luca Longinotti (RETIRED) gentoo-dev 2005-08-31 08:21:05 UTC
In the PHP bug there was a patch for the problem: http://bugs.php.net/33733
That would as far as I can see not require to DEPEND on 0.60.X, wich is good,
we'd like to maintain 0.50.X as the required version for PHP since 0.60.X has
practically no dictionaries other than english and german it seems.
Has anyone that patch? The link on the PHP bug is dead, I hope someone who has
that patch somewhere reads this. ;) Thanks, CHTEKK.
Comment 9 Nuno Lopes 2005-08-31 09:26:54 UTC
(In reply to comment #8)
> In the PHP bug there was a patch for the problem: http://bugs.php.net/33733
> That would as far as I can see not require to DEPEND on 0.60.X, wich is good,
> we'd like to maintain 0.50.X as the required version for PHP since 0.60.X has
> practically no dictionaries other than english and german it seems.

As you can see, I've made that patch and that patch has been already applied 
to CVS. But it doesn't fix the dependency on aspell, it just fixes a PHP CLI 
buffer overrun problem.
So, we still need to bump the requirements to 0.60.x.
BTW, I've been using the aspell-pt package (0.50.2) with aspell 0.60.3 and it 
works fine.
Comment 10 Luca Longinotti (RETIRED) gentoo-dev 2005-09-01 03:45:44 UTC
Ok thanks for your clarification. Do you know if the PHP+Aspell 0.50.X segfault
only happens with 5.1? I'll test this evening and correct the depedencies
accoridingly, it would be good to have 4.4.0 and 5.0.4 at least working with
0.50.X, but I'll have to try and see. If you already know where it works and
where not, that would really help. ;)
Have a nice day, CHTEKK.
Comment 11 Nuno Lopes 2005-09-01 04:11:05 UTC
(In reply to comment #10)
> Ok thanks for your clarification. Do you know if the PHP+Aspell 0.50.X 
segfault
> only happens with 5.1?

I haven't tested it with other versions, but it should segfault with all PHP 
versions, as the pspell extension code hasn't changed for quite a long time in 
all branches.

Comment 12 Jakub Moc (RETIRED) gentoo-dev 2005-09-07 05:14:29 UTC
OK, let's summarize this:

Upstream aspell devs made a stupid change which broke backwards compatibility
with the dictionaries, for no apparent reason and declared the old version
unsupported. Really "smart" move, considering there are only two dictionaries 
compatible with aspell-0.60.x ;p

So, the options I see:

1/ Patch aspell so that it has strip-accents option back and dictionaries start
to work again.
2/ Block incompatible dictionaries in the new aspell versions (won't make many
people happy, but it's really not PHP problem, then can complain upstream who
broke it.)
3/ Fix the dictionaries (good luck, any volunteers? ;p)

Other ideas?
Comment 13 Nuno Lopes 2005-09-08 03:40:40 UTC
aha! I've found the problem :)
The problem seems to be in PHP, as it isn't using the pspell api correctly. 
Anyway its strange that is doesn't segfault with aspell 0.60.x (nor with older 
versions).

I've asked the aspell author to take a look to my patch, to say if it is 
backward compatible. If it is, I'll post a bug at PHP, thus fixing this bug :)

The patch: http://mega.ist.utl.pt/~ncpl/php_pspell_patch.txt
Comment 14 Luca Longinotti (RETIRED) gentoo-dev 2005-09-17 15:33:27 UTC
Any news on this from the pspell or PHP people? Is the patch correct and can we
use it to lower the DEPEND again to 0.50.X version of aspell? Info appreciated.
Best regards, CHTEKK.
Comment 15 Nuno Lopes 2005-09-18 03:22:07 UTC
oh, sorry, I've completly forgot this bug report..
Tha patch has been applied to all PHP branches, as can be seen in:
http://bugs.php.net/34456
http://news.php.net/php.cvs/33922

I've only tested it with aspell 0.50.5. Please test the patch with other 
aspell versions, and then you can safely close this bug (and lower the DEPEND 
again).

Thanks,
Nuno
Comment 16 Luca Longinotti (RETIRED) gentoo-dev 2005-09-18 06:07:05 UTC
Ok thanks for reporting back.
I'll add the patch to all dev-lang/php releases and lower the DEPEND for them
again, the changes will be committed to Portage during the next week, along with
a patch for the USE="gd -png" problem reported in another bug. :)
Best regards, CHTEKK.
Comment 17 Luca Longinotti (RETIRED) gentoo-dev 2005-09-29 12:16:21 UTC
Ok, sorry for the delay.
I've just committed the patches and lowered the DEPENDs, you can find up-to-date
ebuilds on the PHP Overlay for testing, they will be added to Portage later this
week I think.
Best regards, CHTEKK.

[1] http://svn.gnqs.org/projects/gentoo-php-overlay/
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2005-09-29 12:18:51 UTC
Please, test.
Comment 19 Joe Jezak (RETIRED) gentoo-dev 2005-11-21 21:42:58 UTC
Seems okay on ppc, add us again if you need anything else.