|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-22 12:09 UTC] mtr at media dot mit dot edu
Installing php-4.3.0 with php-4.3.0RC2-stat+onupdateint+zendparam.patch applied on Tru64 5.0A using gcc-3.0.4 results in two unaligned access errors as follows: ./configure --with-apxs=/usr/local/apache_1.3.27/bin/apxs --enable-trans-sid --with-zlib=/usr/local --with-openssl=/usr/local/ssl --with-imap=../imap-2001a --with-mysql=/usr/local/mysql-3.23.53 --with-gettext=/usr/local bash-2.05b# gmake install Installing PHP CLI binary: /usr/local/bin/ Installing PHP SAPI module [activating module `php4' in /usr/local/apache/conf/httpd.conf] . . . Installing PEAR environment: /usr/local/lib/php/ Unaligned access pid=213250 <php> va=0x14005c8e4 pc=0x12019e658 ra=0x12019db68 inst=0xb4290000 [PEAR] Archive_Tar - already installed: 0.9 [PEAR] Console_Getopt - already installed: 1.0 [PEAR] PEAR - already installed: 1.0b3 Unaligned access pid=213308 <php> va=0x14005c8e4 pc=0x12019e658 ra=0x12019db68 inst=0xb4290000 [PEAR] DB - already installed: 1.3 . . . etc ... PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
I have encountered this problem and know where the problem lies. The problem lies in the use of OnUpdateInt by the zlib extension, and by grep anyway in a half dozen other extensions. Despite the name, OnUpdateInt requires that the target be a long and not an int. If you modify ext/zlib/php_zlib.h and change int output_compression; int output_compression_level; to longs the problem will go away. The reason for this is that OnUpdateInt casts the pointer passed to it as a long* which on Tru64 is 64 bits vs. a 32 bit value for an int. When zlib is initialized, the first value is ok because it happend to be 64 aligned, but the second value is not, and so generates the unaligned warning. This is *not* a trivial problem as the assignment to the long* means the 64 bits gets written into a 32 bit space which means whatever follows in memory get trashed. Given the endian of the machine, the value appears correct if the int is checked though, but you get this apparently "random" data corruption of the next member of the structure.