|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-09 14:51 UTC] pajoye@php.net
[2008-06-09 15:23 UTC] shaunspiller at gmail dot com
[2008-06-09 20:43 UTC] bjori@php.net
[2008-06-24 19:14 UTC] danbrown@php.net
[2008-07-02 01:00 UTC] doc-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 10:00:01 2025 UTC |
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