(faulty patch) CGI 4.02 crash backrace

From: Date: Thu, 19 Oct 2000 18:19:09 +0000
Subject: (faulty patch) CGI 4.02 crash backrace
References: 1 2  Groups: php.qa 
Request: Send a blank email to php-qa+get-1537@lists.php.net to get a copy of this message
Andi Gutmans wrote: > > Can you get a back trace on this one? Is this also reproducable from > command line? > *** I recompiled and retried from scratch using an "Hello World" script. Stock PHP-4.0.2 doesn't crash. I retried with a long configure and it didn't crash either. However we run a patched version which enables safe mode while allowing different users to own their generated files instead of leaving them to Apache, and some other features aimed at providing mass-hosting of PHP. Most probably this code is faulty... Sorry for the alert. Here is the backtrace for the (poorly) patched version : [root@php1 php-4.0.2]# /root/bin/php -f crash_test.php Segmentation fault (core dumped) [root@php1 php-4.0.2]# gdb /root/bin/php core GNU gdb 19991004 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... Core was generated by ` '. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libgdbm.so.2...done. Reading symbols from /lib/libpam.so.0...done. Reading symbols from /lib/libdl.so.2...done. Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.6...done. Reading symbols from /usr/lib/libgd.so.1...done. Reading symbols from /lib/libresolv.so.2...done. Reading symbols from /lib/libm.so.6...done. Reading symbols from /lib/libcrypt.so.1...done. Reading symbols from /lib/libnsl.so.1...done. Reading symbols from /lib/libc.so.6...done. Reading symbols from /lib/ld-linux.so.2...done. Reading symbols from /usr/lib/libz.so.1...done. Reading symbols from /usr/local/lib/php/extensions/ZendOptimizer.so...done. Reading symbols from /lib/libnss_files.so.2...done. #0 0x40142e23 in strncpy (s1=0xbffffbc0 "", s2=0x8129fbe "", n=4159529026) at ../sysdeps/generic/strncpy.c:82 82 ../sysdeps/generic/strncpy.c: No such file or directory. > Andi > > At 19:05 19/10/00 +0200, Hellekin O. Wolf wrote: > >Joey Smith wrote: > > > > > > A few seconds with strace revealed the problem with my > > > --with-config-file-path. It needs to point at a *directory*, not the > > > actual php.ini file. In my case, it was looking for > > > /usr/local/lib/php/php.ini/php.ini, which it could not find. A closer > > > read of the option in ./configure --help shows that this is the expected > > > behavior (I just never read it <sheepish grin>). > > > > > > Does this fix the problem you were seeing? > > > > >*** Yes... Although I think it wasn't specified in the docs at the > >time... > >Now, compiling with --with-config-file-path=/some/dir works as expected. > > > >Another silly problem is that --enable-discard-path breaks with CGI > >4.0.2 (didn't test with 3 and 3pl1) : the compilation works but the CGI > >crashes. Anyone noticed that ? > > > >hellekin > > > >-- > >PHP Quality Assurance Mailing List > ><http://www.php.net/> > >To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net > >For additional commands, e-mail: php-qa-help@lists.php.net > >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > --- > Andi Gutmans <andi@zend.com> > http://www.zend.com/ -- _ _ _ / \_/ \ ,___ ___ (_) ,___ Hellekin O. Wolf / _._ \ / _ |/ _ \| |/ _ | mailto:hellekin@mmania.com / / \ \| (_| | | | | | (_| | phone:+33 (0)1 53 35 12 66 \_/ DEV \_/ \__,_|_| |_|_|\__,_| http://www.multimania.fr/

« previous php.qa (#1537) next »