Hi,

I've committed a fix, can you check if it's ok?

2011/6/22 Jérôme Loyet <m...@fatbsd.com>:
> Hi
>
> it breaks FPM in 5.4 branch on my server:
>
> fat@dev:~/dev/php-src/branches/PHP_5_4$ gdb ./sapi/fpm/php-fpm
> GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm...done.
> (gdb) run
> Starting program: /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/php-fpm
> [Thread debugging using libthread_db enabled]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff6ec8394 in pthread_mutex_lock () from
> /lib/x86_64-linux-gnu/libpthread.so.0
> (gdb) bt
> #0  0x00007ffff6ec8394 in pthread_mutex_lock () from
> /lib/x86_64-linux-gnu/libpthread.so.0
> #1  0x00000000005dc336 in tsrm_mutex_lock (mutexp=0x0) at
> /home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:666
> #2  0x00000000005dbaff in ts_resource_ex (id=0, th_id=0x0) at
> /home/fat/dev/php-src/branches/PHP_5_4/TSRM/TSRM.c:345
> #3  0x000000000065858a in zend_strndup (s=0x98ec46 "0", length=1) at
> /home/fat/dev/php-src/branches/PHP_5_4/Zend/zend_alloc.c:2612
> #4  0x000000000080f290 in fcgi_set_mgmt_var (name=0x98ec48
> "FCGI_MPXS_CONNS", name_len=15, value=0x98ec46 "0", value_len=1) at
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:1109
> #5  0x000000000080cf9f in fcgi_init () at
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c:195
> #6  0x0000000000818e16 in main (argc=1, argv=0x7fffffffe158) at
> /home/fat/dev/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c:1590
>
> fat@dev:~/dev/php-src/branches/PHP_5_4$ cat config.nice
> #! /bin/sh
> #
> # Created by configure
>
> './configure' \
> '--disable-all' \
> '--enable-fpm' \
> '--prefix=/home/fat/php/5.4.x' \
> '--enable-session' \
> '--enable-phar' \
> '--enable-debug' \
> '--enable-maintainer-zts' \
> "$@"
>
> the code arround line 1109 in sapi/fpm/fpm/fastcgi.c
>
> void fcgi_set_mgmt_var(const char * name, size_t name_len, const char
> * value, size_t value_len)
> {
>  zval * zvalue;
>  zvalue = pemalloc(sizeof(*zvalue), 1);
>  Z_TYPE_P(zvalue) = IS_STRING;
>  Z_STRVAL_P(zvalue) = pestrndup(value, value_len, 1); /* <----------
> this line */
>  Z_STRLEN_P(zvalue) = value_len;
>  zend_hash_add(&fcgi_mgmt_vars, name, name_len + 1, &zvalue,
> sizeof(zvalue), NULL);
> }
>
> is there something to change in the call to pestrndup ?
>
> ++ Jerome
>
> 2011/6/22 Ilia Alshanetsky <il...@php.net>:
>> iliaa                                    Wed, 22 Jun 2011 14:23:21 +0000
>>
>> Revision: http://svn.php.net/viewvc?view=revision&revision=312377
>>
>> Log:
>> Zend Signal Handling
>>
>> Changed paths:
>>    U   php/php-src/branches/PHP_5_4/NEWS
>>    U   php/php-src/branches/PHP_5_4/TSRM/TSRM.c
>>    U   php/php-src/branches/PHP_5_4/TSRM/TSRM.h
>>    U   php/php-src/branches/PHP_5_4/TSRM/tsrm.m4
>>    U   php/php-src/branches/PHP_5_4/Zend/Makefile.am
>>    U   php/php-src/branches/PHP_5_4/Zend/Zend.m4
>>    U   php/php-src/branches/PHP_5_4/Zend/zend.c
>>    U   php/php-src/branches/PHP_5_4/Zend/zend.h
>>    U   php/php-src/branches/PHP_5_4/Zend/zend_alloc.c
>>    U   php/php-src/branches/PHP_5_4/Zend/zend_execute_API.c
>>    U   php/php-src/branches/PHP_5_4/Zend/zend_hash.c
>>    A   php/php-src/branches/PHP_5_4/Zend/zend_signal.c
>>    A   php/php-src/branches/PHP_5_4/Zend/zend_signal.h
>>    U   php/php-src/branches/PHP_5_4/configure.in
>>    U   php/php-src/branches/PHP_5_4/ext/pcntl/pcntl.c
>>    U   php/php-src/branches/PHP_5_4/ext/pcntl/php_signal.c
>>    U   php/php-src/branches/PHP_5_4/ext/pcntl/tests/pcntl_signal.phpt
>>    U   php/php-src/branches/PHP_5_4/ext/standard/info.c
>>    U   php/php-src/branches/PHP_5_4/ext/standard/tests/file/bug22414.phpt
>>    U   
>> php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/phpinfo.phpt
>>    U   php/php-src/branches/PHP_5_4/main/SAPI.c
>>    U   php/php-src/branches/PHP_5_4/main/main.c
>>
>>
>> --
>> PHP CVS Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Regards,
Felipe Pena

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to