ID:               48668
 Comment by:       sriram dot natarajan at gmail dot com
 Reported By:      dmda at yandex dot ru
 Status:           Critical
 Bug Type:         Reproducible crash
 Operating System: Solaris
 PHP Version:      5.3.0RC4
 Assigned To:      dsp
 New Comment:

i have been looking into this issue over the week end and here is what
i found. 

a) this is memory alignment issue and nothing to do with compilers or
optimizations. hence, bug - 47230
(http://bugs.php.net/bug.php?id=47230&edit=1) should be closed as
duplicate of this bug. 

now, why this is happening ?

here is a rough and crude explanation : with php 5.3, addresses
returned from zend_vm_stack_top ,  _get_zval_ptr_tmp etc are not 8 byte
aligned. hence, accessing the 8 byte data results in crashes. 

i haven't come up with a solution yet. i will look more into this after
next week.


Previous Comments:
------------------------------------------------------------------------

[2009-08-10 21:44:07] dmda at yandex dot ru

> by any chance, the submitter built this php5.3 on one machine 
> and ran it on another machine ?

no.

> currently, php 5.3 build process includes -xtarget=native 
> within the configure flags when used with sun studio compiler. 

I used only gcc which is available from sunfreeware. It did never
create any problems with various applications I compiled with it,
including php versions from 4.0.6 up to 5.2.10.

------------------------------------------------------------------------

[2009-08-10 21:24:58] srina...@php.net

by any chance, the submitter built this php5.3 on one machine and ran
it on another machine ?

currently, php 5.3 build process includes -xtarget=native within the
configure flags when used with sun studio compiler. this would mean that
this compiled program will not work on different class of sparc machines
(unless recompiled for that platform)

for e.g, if some one currently built php 5.3 on ultra-sparc III+/IV+
based system (like v410, v220, v880 etc)  then if they try to run the
same on older hardware with chips like sparc II+ hardware, then they
might run into crash.


------------------------------------------------------------------------

[2009-07-28 14:25:31] d...@php.net

PHP is broken on Sparc (and possible every other processor that
requires memalignment) at the moment

------------------------------------------------------------------------

[2009-06-26 15:42:15] d...@php.net

It looks like this is a memalign issue. PHP 5.3.0 is now build with 
flags to avoid the crash. I assign the bug to me to provide a proper
fix 
for the issue for 5.3.1

------------------------------------------------------------------------

[2009-06-24 12:21:10] johan...@php.net

When using --enable-dbug the code works, without --enable-debug the
code fails, maybe that's the reason why I didn't see this before.

uname -a
SunOS techra46 5.8 Generic_117350-54 sun4u sparc SUNW,Sun-Fire-V210

The issue seems to be independent from the compiler but in some way
system dependent, another similar box worked for me.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/48668

-- 
Edit this bug report at http://bugs.php.net/?id=48668&edit=1

Reply via email to