#31129 [Com]: new zend_strtod.c won't compile

2004-12-20 Thread goop at scs dot unr dot edu
 ID:   31129
 Comment by:   goop at scs dot unr dot edu
 Reported By:  long+phpbugs at kestrel dot cc dot ku dot edu
 Status:   Assigned
 Bug Type: Compile Failure
 Operating System: Tru64 4.0F
 PHP Version:  4.3.10
 Assigned To:  derick
 New Comment:

more information:  i compiled [4.3.10] successfully with gcc version
3.3.2, so i guess this has to do with the compiler (for me, Sun Studio
9) - and i really need to use it instead of gcc.

unfortunately, i am not a programmer and cannot produce patches... 
but, derick - if you don't have a solaris/cc environment for
test/debug, i can make it available on request [need to know your IP
addy/subnet range] - just mail me.


Previous Comments:


[2004-12-19 01:53:48] bezruk at gmail dot com

I have same error on Solaris 2.8/INTEL



[2004-12-18 01:15:36] goop at scs dot unr dot edu

having same/close problem with cc: Sun C 5.6 2004/07/15, on Solaris 9. 
Tried basic config (--apxs only), and got same results, paraphrased here
(full output available on request):

...
/bin/sh /tmp/source/php-4.3.10/libtool --silent --preserve-dup-deps
--mode=compile cc  -IZend/ -I/tmp/source/php-4.3.10/Zend/
-DPHP_ATOM_INC -I/tmp/source/php-4.3.10/include
-I/tmp/source/php-4.3.10/main -I/tmp/source/php-4.3.10
-I/tmp/source/php-4.3.10/Zend -I/tmp/source/php-4.3.10/ext/xml/expat 
-D_POSIX_PTHREAD_SEMANTICS -I/tmp/source/php-4.3.10/TSRM  -g 
-prefer-pic -c /tmp/source/php-4.3.10/Zend/zend_strtod.c -o
Zend/zend_strtod.lo 
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: Exactly
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: syntax error
before or at: one
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: one
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: of
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: IEEE_LITTLE_ENDIAN
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: IEEE_BIG_ENDIAN
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: VAX
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: or
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: syntax error
before or at: IBM
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: IBM
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: should
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: be
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: defined
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 239: syntax error
before or at: u_int32_t
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 386: syntax error
before or at: u_int32_t

If I look at Zend/zend_strtod.c (233+), I see this:

#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) +
defined(VAX) + \
defined(IBM) != 1
Exactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or
IBM should be defined.
#endif

I'm no programmer, but doesn't that seem like Exactly...defined.
should be a comment (and thusly commented out, which it is not, and in
which case there seems to be code missing?)?  Seems like that is what
the compiler is barfing on.  Same results with latest snapshot. 
thanks!!!



[2004-12-17 03:20:52] andrew at tophk dot net

This also happens on Solaris 8x86 with gcc version 2.95.3:

I have try the latest snapshot. But the Error again!!

Configure Line:-
./configure --with-mysql=/usr/local/mysql
--with-apxs=/usr/local/apache/bin/apxs --with-gd
--with-jpeg-dir=/usr/local/bin --with-zlib-dir=/usr/local/bin

Make Error Message:-
/bin/sh /export/home/local/php5-STABLE-200412161930/libtool --silent
--preserve-dup-deps --mode=compile gcc  -IZend/
-I/export/home/local/php5-STABLE-200412161930/Zend/ -DPHP_ATOM_INC
-I/export/home/local/php5-STABLE-200412161930/include
-I/export/home/local/php5-STABLE-200412161930/main
-I/export/home/local/php5-STABLE-200412161930
-I/export/home/local/php5-STABLE-200412161930/Zend
-I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/local/mysql/include/mysql  -D_POSIX_PTHREAD_SEMANTICS
-I/export/home/local/php5-STABLE-200412161930/TSRM  -g -O2  -prefer-pic
-c /export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c -o
Zend/zend_strtod.lo 
/export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c:239:
parse error before `u_int32_t'
/export/home/local/php5

#31129 [Com]: new zend_strtod.c won't compile

2004-12-17 Thread goop at scs dot unr dot edu
 ID:   31129
 Comment by:   goop at scs dot unr dot edu
 Reported By:  long+phpbugs at kestrel dot cc dot ku dot edu
 Status:   Assigned
 Bug Type: Compile Failure
 Operating System: Tru64 4.0F
 PHP Version:  4.3.10
 Assigned To:  derick
 New Comment:

having same/close problem with cc: Sun C 5.6 2004/07/15, on Solaris 9. 
Tried basic config (--apxs only), and got same results, paraphrased here
(full output available on request):

...
/bin/sh /tmp/source/php-4.3.10/libtool --silent --preserve-dup-deps
--mode=compile cc  -IZend/ -I/tmp/source/php-4.3.10/Zend/
-DPHP_ATOM_INC -I/tmp/source/php-4.3.10/include
-I/tmp/source/php-4.3.10/main -I/tmp/source/php-4.3.10
-I/tmp/source/php-4.3.10/Zend -I/tmp/source/php-4.3.10/ext/xml/expat 
-D_POSIX_PTHREAD_SEMANTICS -I/tmp/source/php-4.3.10/TSRM  -g 
-prefer-pic -c /tmp/source/php-4.3.10/Zend/zend_strtod.c -o
Zend/zend_strtod.lo 
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: Exactly
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: syntax error
before or at: one
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: one
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: of
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: IEEE_LITTLE_ENDIAN
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: IEEE_BIG_ENDIAN
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 233: warning:
old-style declaration or incorrect type for: VAX
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: or
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: syntax error
before or at: IBM
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: IBM
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: should
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: be
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 234: warning:
old-style declaration or incorrect type for: defined
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 239: syntax error
before or at: u_int32_t
/tmp/source/php-4.3.10/Zend/zend_strtod.c, line 386: syntax error
before or at: u_int32_t

If I look at Zend/zend_strtod.c (233+), I see this:

#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) +
defined(VAX) + \
defined(IBM) != 1
Exactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or
IBM should be defined.
#endif

I'm no programmer, but doesn't that seem like Exactly...defined.
should be a comment (and thusly commented out, which it is not, and in
which case there seems to be code missing?)?  Seems like that is what
the compiler is barfing on.  Same results with latest snapshot. 
thanks!!!


Previous Comments:


[2004-12-17 03:20:52] andrew at tophk dot net

This also happens on Solaris 8x86 with gcc version 2.95.3:

I have try the latest snapshot. But the Error again!!

Configure Line:-
./configure --with-mysql=/usr/local/mysql
--with-apxs=/usr/local/apache/bin/apxs --with-gd
--with-jpeg-dir=/usr/local/bin --with-zlib-dir=/usr/local/bin

Make Error Message:-
/bin/sh /export/home/local/php5-STABLE-200412161930/libtool --silent
--preserve-dup-deps --mode=compile gcc  -IZend/
-I/export/home/local/php5-STABLE-200412161930/Zend/ -DPHP_ATOM_INC
-I/export/home/local/php5-STABLE-200412161930/include
-I/export/home/local/php5-STABLE-200412161930/main
-I/export/home/local/php5-STABLE-200412161930
-I/export/home/local/php5-STABLE-200412161930/Zend
-I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/local/mysql/include/mysql  -D_POSIX_PTHREAD_SEMANTICS
-I/export/home/local/php5-STABLE-200412161930/TSRM  -g -O2  -prefer-pic
-c /export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c -o
Zend/zend_strtod.lo 
/export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c:239:
parse error before `u_int32_t'
/export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c:239:
warning: no semicolon at end of struct or union
/export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c:240:
warning: data definition has no type or storage class
/export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c:386:
parse error before `u_int32_t'
/export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c:386:
warning: no semicolon at end of struct or union
/export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c: In
function `Balloc':
/export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c:405:
dereferencing pointer to incomplete type
/export/home/local/php5-STABLE-200412161930/Zend/zend_strtod.c:409:
sizeof applied

#18647 [Com]: ps_mm_destroy segfault

2003-12-18 Thread goop at scs dot unr dot edu
 ID:   18647
 Comment by:   goop at scs dot unr dot edu
 Reported By:  tomas at intermedia dot com dot ar
 Status:   No Feedback
 Bug Type: Session related
 Operating System: RedHat 7.2
 PHP Version:  4.2.2
 New Comment:

I seem to be having the same problem.  Wasn't sure whether to open a
new bug (this is 1.5 yrs old now) or not.  I'll add comment here and
hope it gets re-opened:

Environment is Apache 1.3.29 with mod_php 4.3.4 and mm 1.3.0 in a
chroot environment on Solaris 8 (patched).  This environment seems to
work fine (+1 week under production load) with
php.ini:session.save_handler = files.  However, we get cascading
(multiple children) SEGV and bus errors 1-3 hours after starting
apache/php with php.ini:session.save_handler = mm.  We didn't
experience this on our test environment, and so I think it's load
related or exacerbated.

export CC=gcc -m32
export LD_LIBRARY_PATH=/usr/local/lib
export EAPI_MM=SYSTEM
./configure --with-config-file-path=/conf --enable-trans-sid
--enable-sockets --enable-ftp
--with-zlib-dir=/usr/local --with-mysql=/usr/local/mysql
--with-mcrypt=/usr/local --with-mhash=/usr/local --with-ndbm --with-mm
--with-openssl=/usr/local/ssl --with-gd --with-png-dir -with-jpeg-dir
--with-ttf --with-freetype-dir=/usr/local --enable-gd-native-ttf
--with-gettext --with-imap=/usr/local --with-dom=/usr/local
--enable-force-cgi-redirect --enable-discard-path
--disable-path-info-check 
--with-apxs=/usr/local/WWW/bin/apxs --enable-cli --prefix=/usr/local


I'm new to coding and bug reporting (apologies), so this is all I have
for now.  I will install gdb, recompile php with debug, and get you a
gdb backtrace as soon as I can.  However, I used Sun's dbx (on one of
several cores) to determine the problem seems to be originating in
ps_mm_destroy (mod_mm.c):


[foo:/WWW/logs/truss]# dbx ../../bin/httpd core
detected a multithreaded program
[EMAIL PROTECTED] ([EMAIL PROTECTED]) terminated by signal BUS (Bus Error)
0xfec6d678: ps_mm_destroy+0x0044:   ld  [%o1], %l0
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where 
 
current thread: [EMAIL PROTECTED]
=[1] ps_mm_destroy(0x11bb68, 0xfed2893c, 0xffbef78c, 0x13e298,
0xfee6acf8, 0xfee6a270), at 0xfec6d678
  [2] zm_shutdown_ps_mm(0x0, 0x5, 0x17, 0x13e288, 0x33, 0x13ecf8), at
0xfec6d87c
  [3] zm_shutdown_session(0x0, 0x5, 0x13f6c0, 0xff23c000, 0x0, 0x0), at
0xfec6c73c
  [4] module_destructor(0x13e240, 0x0, 0xd, 0xfed23778, 0x0, 0x49fd8),
at 0xfed212d0
  [5] zend_hash_apply_deleter(0xfee6f5e4, 0x13e208, 0x19cc18,
0xff23c000, 0x0, 0x0), at 0xfed23800
  [6] zend_hash_graceful_reverse_destroy(0xfee6f5e4, 0x0, 0x0,
0xfed1e0e8, 0x0, 0x0), at 0xfed23898
  [7] zend_shutdown(0x0, 0x0, 0x0, 0x0, 0x0, 0x1), at 0xfed1e0f8
  [8] php_module_shutdown(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfecefbb4
  [9] php_module_shutdown_wrapper(0x0, 0x1, 0xfef9933c, 0x166,
0xfecefb60, 0x452c), at 0xfecefb64
  [10] apache_php_module_shutdown_wrapper(0x0, 0xb4400, 0x0, 0x0, 0x0,
0xf2c70), at 0xfed31aa8
  [11] run_cleanups(0x1e4220, 0xb4400, 0x0, 0x0, 0x0, 0x0), at 0x38d7c
  [12] ap_clear_pool(0xbffd8, 0xb4400, 0x, 0x2a, 0xff240430,
0x1c86d8), at 0x36c10
  [13] ap_destroy_pool(0xbffd8, 0xb4400, 0x, 0xff211990,
0xffbedce1, 0x0), at 0x36ca0
  [14] ap_clear_pool(0xbdfc0, 0xff243a4c, 0xff23fd60, 0xa, 0xff23fd60,
0xffbedca0), at 0x36bcc
  [15] ap_destroy_pool(0xbdfc0, 0x14ec, 0xd, 0xc, 0x0, 0x9ff2c), at
0x36ca0
  [16] clean_parent_exit(0x0, 0x14ec, 0xd, 0xc, 0x9ff2c, 0xf2860),
at 0x4ac48
  [17] standalone_main(0x2, 0xffbefe84, 0xb6754, 0x, 0x0,
0xf2860), at 0x4e2e8
  [18] main(0x2, 0x, 0xffbefe90, 0xb3800, 0x0, 0x0), at
0x4ea78

I will follow up with a gdb backtrace as soon as I can, but hope some
of this info is helpful now.  Thank you very much.


Previous Comments:


[2002-09-09 01:00:06] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2002-07-30 18:21:16] [EMAIL PROTECTED]

This is fixed at least in the HEAD:

http://snaps.php.net/php4-latest.tar.gz

Not sure about 4.2.x branch:

http://snaps.php.net/php4-STABLE-latest.tar.gz



[2002-07-30 09:28:45] tomas at intermedia dot com dot ar

session.save_handler set to mm seg faults at ps_mm_destroy.

gdb bt:
#0  ps_mm_destroy (data=0x80cd120) at mod_mm.c:241
#1  0x40383bc0 in zm_shutdown_ps_mm (type=1, module_number=23) at
mod_mm.c:293
#2  0x403388a7 in module_destructor (module=0x80d05e8) at
zend_API.c:1127
#3  0x4033a2b3 in zend_hash_destroy (ht=0x404bc1e0) at zend_hash.c:541
#4  0x403358e2