[PHP-BUG] Bug #63405 [NEW]: Segfault with traits and namespaces and as operator

2012-10-31 Thread mbret...@php.net
From: mbretter
Operating system: Ubuntu 12.04 32bit
PHP version:  5.4.8
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Segfault with traits and namespaces and as operator

Description:

It looks like that this segfault occurs on every second request, when using
namespaces + traits + autloader + 'as' operator.

Without 'as' op it works.


Test script:
---
_setQueryParam($query, $p, $op, $v);
}
}   

...
}

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
zend_do_bind_traits (ce=0xb6c0873c) at
/build/buildd/php5-5.4.8/Zend/zend_compile.c:4029
4029/build/buildd/php5-5.4.8/Zend/zend_compile.c: No such file or
directory.
(gdb) bt
#0  zend_do_bind_traits (ce=0xb6c0873c) at
/build/buildd/php5-5.4.8/Zend/zend_compile.c:4029
#1  0xb6785bab in ZEND_BIND_TRAITS_SPEC_HANDLER (execute_data=0xb75ab04c)
at /build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:1027
#2  0xb67bc975 in execute (op_array=0xb67442a6) at
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:410
#3  0xb67442a6 in zend_call_function (fci=0x0, fci_cache=0x0) at
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:958
#4  0xb676abd4 in zend_call_method (object_pp=, obj_ce=, 
fn_proxy=, function_name=, 
function_name_len=, retval_ptr_ptr=, 
param_count=, arg1=, 
arg2=) at /build/buildd/php5-5.4.8/Zend/zend_interfaces.c:97
#5  0xb662772a in zif_spl_autoload_call (ht=0, return_value=0x1,
return_value_ptr=0x80225b58, this_ptr=0x0, return_value_used=-2145232000)
at /build/buildd/php5-5.4.8/ext/spl/php_spl.c:436
#6  0xb6744379 in zend_call_function (fci=0x5283354c, fci_cache=0xbfffcd0b)
at /build/buildd/php5-5.4.8/Zend/zend_execute_API.c:980
#7  0xb6744b8d in zend_lookup_class_ex (name=0x802278a8
"app\\modules\\backend\\rest\\controllers\\Language", name_length=45,
key=0x0, use_autoload=1, ce=0xbfffcda0) at
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:1127
#8  0xb6744d4b in zend_lookup_class (name=0x802278a8
"app\\modules\\backend\\rest\\controllers\\Language", name_length=45,
ce=0xbfffcda0) at /build/buildd/php5-5.4.8/Zend/zend_execute_API.c:1152
#9  0xb6764d21 in zif_class_exists (ht=2, return_value=0x80225924,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at
/build/buildd/php5-5.4.8/Zend/zend_builtin_functions.c:1233
#10 0xb6800dfa in zend_do_fcall_common_helper_SPEC
(execute_data=0xb75aa9f0) at
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:642
#11 0xb67bc975 in execute (op_array=0xb6753729) at
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:410
#12 0xb6753729 in zend_execute_scripts (type=0, retval=0xb164,
file_count=0) at /build/buildd/php5-5.4.8/Zend/zend.c:1309
#13 0xb66ecdae in php_execute_script (primary_file=0xb164) at
/build/buildd/php5-5.4.8/main/main.c:2482
#14 0xb68036c0 in php_handler (r=0xb2c61888) at
/build/buildd/php5-5.4.8/sapi/apache2handler/sapi_apache2.c:682


-- 
Edit bug report at https://bugs.php.net/bug.php?id=63405&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63405&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63405&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=63405&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=63405&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=63405&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63405&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=63405&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=63405&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=63405&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=63405&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=63405&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=63405&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=63405&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63405&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=63405&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=63405&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=63405&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63405&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63405&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63405&r=mysqlcfg



Bug #63405 [Com]: Segfault with traits and namespaces and as operator

2012-10-31 Thread mbret...@php.net
Edit report at https://bugs.php.net/bug.php?id=63405&edit=1

 ID: 63405
 Comment by: [email protected]
 Reported by:[email protected]
 Summary:Segfault with traits and namespaces and as operator
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Ubuntu 12.04 32bit
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

I could reduce it to the relevant files:
http://www.1401.at/phpcrash.tgz

=> just invoke index.php several times, the crash occurs reliably ;)


Previous Comments:

[2012-10-31 14:39:43] [email protected]

could you give us a complete test script?


[2012-10-31 09:30:49] [email protected]

Description:

It looks like that this segfault occurs on every second request, when using 
namespaces + traits + autloader + 'as' operator.

Without 'as' op it works.


Test script:
---
_setQueryParam($query, $p, $op, $v);
}
}   

...
}

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
zend_do_bind_traits (ce=0xb6c0873c) at 
/build/buildd/php5-5.4.8/Zend/zend_compile.c:4029
4029/build/buildd/php5-5.4.8/Zend/zend_compile.c: No such file or directory.
(gdb) bt
#0  zend_do_bind_traits (ce=0xb6c0873c) at 
/build/buildd/php5-5.4.8/Zend/zend_compile.c:4029
#1  0xb6785bab in ZEND_BIND_TRAITS_SPEC_HANDLER (execute_data=0xb75ab04c) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:1027
#2  0xb67bc975 in execute (op_array=0xb67442a6) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:410
#3  0xb67442a6 in zend_call_function (fci=0x0, fci_cache=0x0) at 
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:958
#4  0xb676abd4 in zend_call_method (object_pp=, obj_ce=, 
fn_proxy=, function_name=, 
function_name_len=, retval_ptr_ptr=, 
param_count=, arg1=, 
arg2=) 
at /build/buildd/php5-5.4.8/Zend/zend_interfaces.c:97
#5  0xb662772a in zif_spl_autoload_call (ht=0, return_value=0x1, 
return_value_ptr=0x80225b58, this_ptr=0x0, return_value_used=-2145232000) at 
/build/buildd/php5-5.4.8/ext/spl/php_spl.c:436
#6  0xb6744379 in zend_call_function (fci=0x5283354c, fci_cache=0xbfffcd0b) at 
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:980
#7  0xb6744b8d in zend_lookup_class_ex (name=0x802278a8 
"app\\modules\\backend\\rest\\controllers\\Language", name_length=45, key=0x0, 
use_autoload=1, ce=0xbfffcda0) at 
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:1127
#8  0xb6744d4b in zend_lookup_class (name=0x802278a8 
"app\\modules\\backend\\rest\\controllers\\Language", name_length=45, 
ce=0xbfffcda0) at /build/buildd/php5-5.4.8/Zend/zend_execute_API.c:1152
#9  0xb6764d21 in zif_class_exists (ht=2, return_value=0x80225924, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at 
/build/buildd/php5-5.4.8/Zend/zend_builtin_functions.c:1233
#10 0xb6800dfa in zend_do_fcall_common_helper_SPEC (execute_data=0xb75aa9f0) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:642
#11 0xb67bc975 in execute (op_array=0xb6753729) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:410
#12 0xb6753729 in zend_execute_scripts (type=0, retval=0xb164, 
file_count=0) at /build/buildd/php5-5.4.8/Zend/zend.c:1309
#13 0xb66ecdae in php_execute_script (primary_file=0xb164) at 
/build/buildd/php5-5.4.8/main/main.c:2482
#14 0xb68036c0 in php_handler (r=0xb2c61888) at 
/build/buildd/php5-5.4.8/sapi/apache2handler/sapi_apache2.c:682







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


Bug #63405 [Com]: Segfault with traits and namespaces and as operator

2012-10-31 Thread mbret...@php.net
Edit report at https://bugs.php.net/bug.php?id=63405&edit=1

 ID: 63405
 Comment by: [email protected]
 Reported by:[email protected]
 Summary:Segfault with traits and namespaces and as operator
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Ubuntu 12.04 32bit
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

ok, I've found that the problem disappears, if I'm disabling APC, so this bug 
seems to be APC related.

So you can close this Bug.


Previous Comments:

[2012-10-31 20:59:39] [email protected]

I could reduce it to the relevant files:
http://www.1401.at/phpcrash.tgz

=> just invoke index.php several times, the crash occurs reliably ;)


[2012-10-31 14:39:43] [email protected]

could you give us a complete test script?


[2012-10-31 09:30:49] [email protected]

Description:

It looks like that this segfault occurs on every second request, when using 
namespaces + traits + autloader + 'as' operator.

Without 'as' op it works.


Test script:
---
_setQueryParam($query, $p, $op, $v);
}
}   

...
}

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
zend_do_bind_traits (ce=0xb6c0873c) at 
/build/buildd/php5-5.4.8/Zend/zend_compile.c:4029
4029/build/buildd/php5-5.4.8/Zend/zend_compile.c: No such file or directory.
(gdb) bt
#0  zend_do_bind_traits (ce=0xb6c0873c) at 
/build/buildd/php5-5.4.8/Zend/zend_compile.c:4029
#1  0xb6785bab in ZEND_BIND_TRAITS_SPEC_HANDLER (execute_data=0xb75ab04c) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:1027
#2  0xb67bc975 in execute (op_array=0xb67442a6) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:410
#3  0xb67442a6 in zend_call_function (fci=0x0, fci_cache=0x0) at 
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:958
#4  0xb676abd4 in zend_call_method (object_pp=, obj_ce=, 
fn_proxy=, function_name=, 
function_name_len=, retval_ptr_ptr=, 
param_count=, arg1=, 
arg2=) 
at /build/buildd/php5-5.4.8/Zend/zend_interfaces.c:97
#5  0xb662772a in zif_spl_autoload_call (ht=0, return_value=0x1, 
return_value_ptr=0x80225b58, this_ptr=0x0, return_value_used=-2145232000) at 
/build/buildd/php5-5.4.8/ext/spl/php_spl.c:436
#6  0xb6744379 in zend_call_function (fci=0x5283354c, fci_cache=0xbfffcd0b) at 
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:980
#7  0xb6744b8d in zend_lookup_class_ex (name=0x802278a8 
"app\\modules\\backend\\rest\\controllers\\Language", name_length=45, key=0x0, 
use_autoload=1, ce=0xbfffcda0) at 
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:1127
#8  0xb6744d4b in zend_lookup_class (name=0x802278a8 
"app\\modules\\backend\\rest\\controllers\\Language", name_length=45, 
ce=0xbfffcda0) at /build/buildd/php5-5.4.8/Zend/zend_execute_API.c:1152
#9  0xb6764d21 in zif_class_exists (ht=2, return_value=0x80225924, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at 
/build/buildd/php5-5.4.8/Zend/zend_builtin_functions.c:1233
#10 0xb6800dfa in zend_do_fcall_common_helper_SPEC (execute_data=0xb75aa9f0) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:642
#11 0xb67bc975 in execute (op_array=0xb6753729) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:410
#12 0xb6753729 in zend_execute_scripts (type=0, retval=0xb164, 
file_count=0) at /build/buildd/php5-5.4.8/Zend/zend.c:1309
#13 0xb66ecdae in php_execute_script (primary_file=0xb164) at 
/build/buildd/php5-5.4.8/main/main.c:2482
#14 0xb68036c0 in php_handler (r=0xb2c61888) at 
/build/buildd/php5-5.4.8/sapi/apache2handler/sapi_apache2.c:682







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


Bug #63405 [Com]: Segfault with traits and namespaces and as operator

2012-10-31 Thread mbret...@php.net
Edit report at https://bugs.php.net/bug.php?id=63405&edit=1

 ID: 63405
 Comment by: [email protected]
 Reported by:[email protected]
 Summary:Segfault with traits and namespaces and as operator
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Ubuntu 12.04 32bit
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

after Upgrading APC from 3.1.11 to 3.1.13 the crash does not occur anymore :D


Previous Comments:

[2012-10-31 21:10:54] [email protected]

ok, I've found that the problem disappears, if I'm disabling APC, so this bug 
seems to be APC related.

So you can close this Bug.


[2012-10-31 20:59:39] [email protected]

I could reduce it to the relevant files:
http://www.1401.at/phpcrash.tgz

=> just invoke index.php several times, the crash occurs reliably ;)


[2012-10-31 14:39:43] [email protected]

could you give us a complete test script?


[2012-10-31 09:30:49] [email protected]

Description:

It looks like that this segfault occurs on every second request, when using 
namespaces + traits + autloader + 'as' operator.

Without 'as' op it works.


Test script:
---
_setQueryParam($query, $p, $op, $v);
}
}   

...
}

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
zend_do_bind_traits (ce=0xb6c0873c) at 
/build/buildd/php5-5.4.8/Zend/zend_compile.c:4029
4029/build/buildd/php5-5.4.8/Zend/zend_compile.c: No such file or directory.
(gdb) bt
#0  zend_do_bind_traits (ce=0xb6c0873c) at 
/build/buildd/php5-5.4.8/Zend/zend_compile.c:4029
#1  0xb6785bab in ZEND_BIND_TRAITS_SPEC_HANDLER (execute_data=0xb75ab04c) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:1027
#2  0xb67bc975 in execute (op_array=0xb67442a6) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:410
#3  0xb67442a6 in zend_call_function (fci=0x0, fci_cache=0x0) at 
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:958
#4  0xb676abd4 in zend_call_method (object_pp=, obj_ce=, 
fn_proxy=, function_name=, 
function_name_len=, retval_ptr_ptr=, 
param_count=, arg1=, 
arg2=) 
at /build/buildd/php5-5.4.8/Zend/zend_interfaces.c:97
#5  0xb662772a in zif_spl_autoload_call (ht=0, return_value=0x1, 
return_value_ptr=0x80225b58, this_ptr=0x0, return_value_used=-2145232000) at 
/build/buildd/php5-5.4.8/ext/spl/php_spl.c:436
#6  0xb6744379 in zend_call_function (fci=0x5283354c, fci_cache=0xbfffcd0b) at 
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:980
#7  0xb6744b8d in zend_lookup_class_ex (name=0x802278a8 
"app\\modules\\backend\\rest\\controllers\\Language", name_length=45, key=0x0, 
use_autoload=1, ce=0xbfffcda0) at 
/build/buildd/php5-5.4.8/Zend/zend_execute_API.c:1127
#8  0xb6744d4b in zend_lookup_class (name=0x802278a8 
"app\\modules\\backend\\rest\\controllers\\Language", name_length=45, 
ce=0xbfffcda0) at /build/buildd/php5-5.4.8/Zend/zend_execute_API.c:1152
#9  0xb6764d21 in zif_class_exists (ht=2, return_value=0x80225924, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at 
/build/buildd/php5-5.4.8/Zend/zend_builtin_functions.c:1233
#10 0xb6800dfa in zend_do_fcall_common_helper_SPEC (execute_data=0xb75aa9f0) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:642
#11 0xb67bc975 in execute (op_array=0xb6753729) at 
/build/buildd/php5-5.4.8/Zend/zend_vm_execute.h:410
#12 0xb6753729 in zend_execute_scripts (type=0, retval=0xb164, 
file_count=0) at /build/buildd/php5-5.4.8/Zend/zend.c:1309
#13 0xb66ecdae in php_execute_script (primary_file=0xb164) at 
/build/buildd/php5-5.4.8/main/main.c:2482
#14 0xb68036c0 in php_handler (r=0xb2c61888) at 
/build/buildd/php5-5.4.8/sapi/apache2handler/sapi_apache2.c:682







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