From: shaunspiller at gmail dot com Operating system: Win32 PHP version: 5.2.6 PHP Bug Type: Reproducible crash Bug description: php_gmp.dll uses exotic instructions
Description: ------------ I'm using the latest precompiled Win32 binaries of PHP-5.2.6 (and have also tried PHP-5.1.6) and get a program crash with an #Undefined Opcode exception when loading php_gmp.dll. I know what the problem is and I'm not sure if one would consider it a bug or not since it will only happen on very old machines, but I can't believe I'm the first person to have ever encountered this. The instruction in php_gmp.dll which causes the crash is CMOVZ EDX, EAX. The conditional move instructions were only added with the Pentium Pro. Tough luck for me -- my computer literally blew up last week and I'm stuck temporarally with a Pentium MMX and a K6 laptop, neither of which support CMOVcc. It's understandable that compiling for P6+ instructions might be a good tradeoff between performance and compatibility, but current versions of PHP are *stated* to work with even Windows 98 and up, and so are the precompiled binaries (other extensions seem to work just fine). I don't know how much CMOVcc is relied on in php_gmp.dll, and changing the build options to use generic I386+ might be undesirable, but the P6 instruction set requirement should at least be *mentioned* somewhere, and it isn't (not that I found). Disappointing for me in either case, because recompiling the DLL is a little beyond what I can do on this old system right now. I would normally have just used BCMath instead, but I need the base-conversion stuff, which that doesn't have. Reproduce code: --------------- <?php dl('php_gmp.dll'); echo 'hi!'; ?> Expected result: ---------------- hi! Actual result: -------------- Instant program crash. Windows provides the following info: PHP executed an invalid instruction in module PHP_GMP.DLL at 0187:01a760f4. Registers: EAX=01a7ced0 CS=0187 EIP=01a760f4 EFLGS=00010202 EBX=01a710e0 SS=018f ESP=00d3f904 EBP=01989c20 ECX=01a710c0 DS=018f ESI=0000001a FS=12c7 EDX=01a710b0 ES=018f EDI=01370ae0 GS=0000 Bytes at CS:EIP: 0f 44 d0 b8 60 cf a7 01 85 c9 0f 44 c8 85 db b8 Stack dump: 1001a380 01a710a4 01a710b0 01a710c0 01a710e0 01a8c2f0 0000000c 01a76120 00000003 0000001a 01370ae0 01a8c2fc 00000013 00000002 00000003 0000001a -- Edit bug report at http://bugs.php.net/?id=45215&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45215&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45215&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45215&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45215&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45215&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45215&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45215&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45215&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45215&r=support Expected behavior: http://bugs.php.net/fix.php?id=45215&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45215&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45215&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45215&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45215&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45215&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45215&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45215&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45215&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45215&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45215&r=mysqlcfg