Overflown on Solaris
I'm getting:
End: Overflown (magic=0x00000000 instead of 0x4839762B)
even with the most trivial of code followed by a seg fault.
If I turn off opcache everything is fine.
I'm using php 5.3.27 compiled with the Solaris Studio compiler.
I've worked my way through these trivial problems:
https://bugs.php.net/bug.php?id=65207
As you can see I'm still 32-bit with most extensions turned off.
Any hints would be greatly appreciated.
Thanks much.
An update: If I compile with gcc I can get somethings working.
Wordpress installs and seems to work but Joomla is giving
me mysql connect issues.
Using gcc to deliver php is not my first choice. Sorry.
Update2: I've successfully compiled opcache with Solaris
Studio on SPARC and it works just fine. Both Wordpress and Joomla
load and seem to work.
So Solaris Studio on Solaris SPARC works.
Solaris Studio on Solaris x86 fails as below.
gcc on Solaris x86 works.
Very bizzare.
I've noted the differences and tried applying those
to my failing Studio x86 but nothing helps.
$ cat simple.php
<?php
function m_x_plus_b($m, $x, $b) {
return $m*$x+$b;
}
$slope=1.5;
$x=2;
$b=3;
echo "y = ".m_x_plus_b($slope,$x,$b)."\n<br>";
?>
cmohrman@msulliva-us2:~/Public/PHP$
cmohrman@msulliva-us2:~/Public/PHP$ php -f simple.php
File /home/cmohrman/Public/PHP/simple.php func m_x_plus_b
Block: 0-5 (6) unused
Block: 6-6 (1)
T0: 0
T1: 0
Opt Block: 0-5 (6)
T0: 0
T1: 0
Opt Block: 0-5 (6)
T0: 0
T1: 0
Opt Block: 0-5 (6)
T0: 0
T1: 0
Out Block: 0-5 (6)
File /home/cmohrman/Public/PHP/simple.php func main
Block: 0-11 (12) unused
T0: 0
T1: 0
T2: 0
T3: 0
T4: 0
T5: 0
[Fri Aug 9 11:10:45 2013] Script: '/home/cmohrman/Public/PHP/simple.php'
---------------------------------------
./Optimizer/block_pass.c(2053) : Block 0x0935e970 status:
Beginning: OK (allocated on ./Optimizer/block_pass.c:1911, 6 bytes)
Start: OK
End: Overflown (magic=0x00000000 instead of 0x530646BC)
1 byte(s) overflown
---------------------------------------
Opt Block: 0-11 (12)
[Fri Aug 9 11:10:45 2013] Script: '/home/cmohrman/Public/PHP/simple.php'
---------------------------------------
./Optimizer/block_pass.c(1220) : Block 0x0935fa70 status:
Beginning: OK (allocated on ./Optimizer/block_pass.c:631, 24 bytes)
Start: OK
End: Overflown (magic=0xFFFFFFB4 instead of 0x530646BC)
At least 4 bytes overflown
---------------------------------------
T0: 0
T1: 0
T2: 0
T3: 0
T4: 0
T5: 0
[Fri Aug 9 11:10:45 2013] Script: '/home/cmohrman/Public/PHP/simple.php'
---------------------------------------
./Optimizer/block_pass.c(2053) : Block 0x0935e9a8 status:
Beginning: OK (allocated on ./Optimizer/block_pass.c:1911, 6 bytes)
Start: OK
End: Overflown (magic=0x00000000 instead of 0x530646BC)
1 byte(s) overflown
---------------------------------------
Opt Block: 1-11 (11)
[Fri Aug 9 11:10:45 2013] Script: '/home/cmohrman/Public/PHP/simple.php'
---------------------------------------
./Optimizer/block_pass.c(1220) : Block 0x0935fc80 status:
Beginning: OK (allocated on ./Optimizer/block_pass.c:631, 24 bytes)
Start: OK
End: Overflown (magic=0xFFFFFFB4 instead of 0x530646BC)
At least 4 bytes overflown
---------------------------------------
T0: 0
T1: 0
T2: 0
T3: 0
T4: 0
T5: 0
[Fri Aug 9 11:10:45 2013] Script: '/home/cmohrman/Public/PHP/simple.php'
---------------------------------------
./Optimizer/block_pass.c(2053) : Block 0x0935e9e0 status:
Beginning: OK (allocated on ./Optimizer/block_pass.c:1911, 6 bytes)
Start: OK
End: Overflown (magic=0x00000000 instead of 0x530646BC)
1 byte(s) overflown
---------------------------------------
Opt Block: 1-11 (11)
[Fri Aug 9 11:10:45 2013] Script: '/home/cmohrman/Public/PHP/simple.php'
---------------------------------------
./Optimizer/block_pass.c(1220) : Block 0x0935ea50 status:
Beginning: OK (allocated on ./Optimizer/block_pass.c:631, 24 bytes)
Start: OK
End: Overflown (magic=0xFFFFFFB4 instead of 0x530646BC)
At least 4 bytes overflown
---------------------------------------
T0: 0
T1: 0
T2: 0
T3: 0
T4: 0
T5: 0
[Fri Aug 9 11:10:45 2013] Script: '/home/cmohrman/Public/PHP/simple.php'
---------------------------------------
./Optimizer/block_pass.c(2053) : Block 0x0935ea18 status:
Beginning: OK (allocated on ./Optimizer/block_pass.c:1911, 6 bytes)
Start: OK
End: Overflown (magic=0x00000000 instead of 0x530646BC)
1 byte(s) overflown
---------------------------------------
Out Block: 0-10 (11)
Segmentation Fault (core dumped)
cmohrman@msulliva-us2:~/Public/PHP$
cmohrman@msulliva-us2:~/Public/PHP$
cmohrman@msulliva-us2:~/Public/PHP$ mdb core
Loading modules: [ libc.so.1 libuutil.so.1 libnvpair.so.1 ld.so.1 ]
> ::stack
opcache.so`optimize_temporary_variables+0x504(935cdf0, 0)
opcache.so`zend_optimizer+0x2c3d(935cdf0, 0)
opcache.so`accel_op_array_handler+0x80(935cdf0, 0, 4c, 8af6905)
php`zend_extension_op_array_handler+0x1b(93fc4e0, 935cdf0, fea392d8, 8af3d21)
php`zend_llist_apply_with_argument+0x31(91e7b60, 8af6a8c, 935cdf0, 8af6ac5)
php`pass_two+0xac(935cdf0, 0, fea39448, 8aa0e38)
php`compile_file+0x5d9(fea3a400, 8, fea39620, 86a67dc)
php`phar_compile_file+0x370(fea3a400, 8)
opcache.so`compile_and_cache_file+0x424(fea3a400, 8, f8764444, 26, fea39950,
fea39954)
opcache.so`persistent_compile_file+0x750(fea3a400, 8, 8058b50, 8b16131)
php`zend_execute_scripts+0x2da(8, 0, 3, 0, fea3a400, 0)
php`php_execute_script+0x3a8(fea3a400, 918f000, fea3a8c8, 8c94507)
php`main+0x15d6(3, fea3a8fc, fea3a90c, f8aa9940)
_start+0x7d(3, fea3a9fc, fea3aa00, fea3aa03, 0, fea3aa0e)
>