On Sat, Feb 12, 2005 at 09:42:07PM +0100, Cyril Chaboisseau wrote:

> when I do

> $ /usr/bin/php4 -c php.ini -q ./recode.php
> Erreur de segmentation (core dumped)

> here is php.ini :
> [PHP]
> extension=recode.so

> and recode.php :
> <?
>   echo recode_string("utf-8..html_4.0","Hello, World !");
> ?>

> it also segfault with other charsets

> I've also tried with register_globals = Off
> WRT bug #213557

> I first tought it was a bug on librecode but it works well from the
> command line :

> $ echo "Hello, World"|recode "utf-8..html_4.0"
> Hello, World

> now, maybe it's not critical since I've only tested the bug on amd64 and
> not i386 (the only 2 architectures I have)

> anyone willing to test that on ppc64, alpha, sparc64 ?

04:43 <vorlon> the recode segfault is reproducible on alpha.
04:47 <vorlon> also reproducible against testing.
04:48 <vorlon> segfault happens deep inside librecode, I'd be surprised if
               this was our fault.
04:49 <infinity> As would I, except that it works with the CLI recode tool.
04:49 <infinity> Perhaps PHP just tickles it in a slightly different way,
                 though.
04:49 <infinity> Thanks for the digging.
04:49 <vorlon> I'll check build 64-bit build logs for anything suspicious.
04:51 <vorlon> /build/buildd/php4-4.3.10/ext/recode/recode.c:156: warning:
               passing arg 5 of `recode_buffer_to_buffer' from incompatible
               pointer type
04:51 <vorlon> /build/buildd/php4-4.3.10/ext/recode/recode.c:156: warning:
               passing arg 6 of `recode_buffer_to_buffer' from incompatible
               pointer type
04:52  * vorlon whistles nonchalantly
04:57 <vorlon> PHP is passing two int *'s where size_t * is required.  Yeah,
               that'd probably do the trick. :P
04:57 <infinity> Who's wrong?  PHP, or the recode headers?
04:57 <vorlon> PHP. :)
04:58 <infinity> Check.  Can you cut'n'paste this conversation to the bug?..
                 I'll patch it ASAP.
04:58 <vorlon> well, let me build and verify that changing this actually
               fixes the segfault.
04:58 <infinity> even if it doesn't, it should be fixed.
04:58 <vorlon> yes, but I only want to have to send one email. :)
04:58 <infinity> When I have a spare day, I should go hunting for
                 endian/size issues again.
06:01 <vorlon> fixed, sending mail.


-- 
Steve Langasek
postmodern programmer

Attachment: signature.asc
Description: Digital signature

Reply via email to