From:             jbarwick at sentienthealth dot com
Operating system: SuSE 9.1 (amd64)
PHP version:      4.3.8
PHP Bug Type:     Compile Failure
Bug description:  mbstring mbregex failure to compile pointer cast problems

Description:
------------
The entire MBREGEX.C object appears to be written with "pointer address
math" using "int" variables.

Whereas we all know that with the invent of i586/i686 systems the int
veriable is nicely 32 bit, in a 64 bit environment, the pointers and the
uint/int objects become completely incompatible.

(Am I crazy here?)...or completely stupid?  

Anyway...lot's of "pointer errors" in mbstring/mbregex.  It appears that
this module is totally unusable in a 64-bit environment.

To FIX, I did the following

mbstring/mbregex/mbregex.h

#define MINT long
#define MLONG long

The changed all "int"'s to "MINT"
and changed all "long"'s to "MLONG"

with a nice search and replace.

Compiled with no compiler warnings (retesting make clean/make as we
speak).

It actually appears that the entire mbstring object must be completely
re-written.  SOOOO much pointer math using int's and so many "cast from
pointer to integer of different size" errors.

any chance of getting 4.3.9 or 4.3.10 compilable for 64-bit?

I have a lot of work left to fix all the mbstring files that wont compile
correctly...errrrg!!!

PLEASE someone tell me I can ignore these because the pointer math works
even when the compiler complains!!

Reproduce code:
---------------
compile mbstring/mbregex.c

Expected result:
----------------
no compiler warnings about bad pointers

Actual result:
--------------
compiler warnings about bad pointers

-- 
Edit bug report at http://bugs.php.net/?id=30558&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30558&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30558&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30558&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30558&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30558&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30558&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30558&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30558&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30558&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30558&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30558&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30558&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30558&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30558&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30558&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30558&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30558&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30558&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30558&r=mysqlcfg

Reply via email to