ID:               40193
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Filesystem function related
 Operating System: Debian Linux/Sparc
 PHP Version:      6CVS-2007-01-22 (CVS)
 New Comment:

Looks like some GCC problem reproducible only on Solaris.



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

[2007-01-22 16:25:22] [EMAIL PROTECTED]

PHP6 on Solaris is not my high priority at the moment.
I'm using GCC 3.4.2 and PHP5.2.x, which works just fine here.

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

[2007-01-22 14:52:44] [EMAIL PROTECTED]

Downgraded to 3.4, now builds and starts without problems, but the
errors are in bad condition - the function name is printed. Endiannees
problem?
[EMAIL PROTECTED]:~/dev/6$ sapi/cli/php -r
'file_get_contents("nofile.txt");'

Warning: (nofile.txt): failed to open stream: No such file or directory
in Command line code on line 1


The problem lies somewhere here :
function.v is not NULL, but function_name_is_string is false. Otherwise
function.s points to the right string, which is "file_get_contents"

        /* if we still have memory then format the origin */
        if (function.v) {
                if (function_name_is_string) {
                        origin_len = spprintf(&origin, 0, "%v%s%s(%s)", 
class_name, space,
function.s, params);
                } else {
                        origin_len = spprintf(&origin, 0, "%v%s%v(%s)", 
class_name, space,
function, params);
                }
        } else {
                origin_len = spprintf(&origin, 0, "%s", stage);
        }

Tony, please contact me if you need more information.

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

[2007-01-22 11:49:36] [EMAIL PROTECTED]

It is known to crash on Solaris/SPARC when built with GCC 4.1, but NOT
with GCC 3.x.
I'd be grateful if you find the reason, but it looks like it's a
problem of newer versions of GCC on SPARC.

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

[2007-01-22 11:37:35] [EMAIL PROTECTED]

Description:
------------
Just php -v on Sparc crashed php (this is HEAD).
gcc 4.1

Reproduce code:
---------------
php -v

Expected result:
----------------
no crash

Actual result:
--------------
[EMAIL PROTECTED]:~/dev/6$ gdb ./php
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) run -v
Starting program: /home/andrey/dev/php6.0-200701212330/php -v
warning: Lowest section in /usr/lib/libicudata.so.36 is .hash at
000000b4
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 3856)]

Program received signal SIGBUS, Bus error.
[Switching to Thread 16384 (LWP 3856)]
0x00315678 in _zend_mm_alloc_int (heap=0x507588, size=5,
__zend_filename=0x4c9b38 "/home/andrey/dev/6/Zend/zend_operators.c",
__zend_lineno=2392, __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at /home/andrey/dev/6/Zend/zend_alloc.c:1499
1499            ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 1);
(gdb) bt
#0  0x00315678 in _zend_mm_alloc_int (heap=0x507588, size=5,
__zend_filename=0x4c9b38 "/home/andrey/dev/6/Zend/zend_operators.c",
__zend_lineno=2392, __zend_orig_filename=0x0,
    __zend_orig_lineno=0) at /home/andrey/dev/6/Zend/zend_alloc.c:1499
#1  0x00316f78 in _emalloc (size=5, __zend_filename=0x4c9b38
"/home/andrey/dev/6/Zend/zend_operators.c", __zend_lineno=2392,
__zend_orig_filename=0x0, __zend_orig_lineno=0)
    at /home/andrey/dev/6/Zend/zend_alloc.c:1864
#2  0x0034f7d0 in zend_str_tolower_dup (source=0x50e108 "TRUE",
length=4) at /home/andrey/dev/6/Zend/zend_operators.c:2392
#3  0x0034fd3c in zend_u_str_case_fold (type=6 '\006', source=
/build/buildd/gdb-6.4.90.dfsg/gdb/regcache.c:175: internal-error:
register_size: Assertion `regnum >= 0 && regnum < (NUM_REGS +
NUM_PSEUDO_REGS)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

/build/buildd/gdb-6.4.90.dfsg/gdb/regcache.c:175: internal-error:
register_size: Assertion `regnum >= 0 && regnum < (NUM_REGS +
NUM_PSEUDO_REGS)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
) at /home/andrey/dev/6/Zend/zend_operators.c:2479
#4  0x003325ec in zend_u_register_constant (type=6 '\006',
c=0xffca35f8, tsrm_ls=0x506060) at
/home/andrey/dev/6/Zend/zend_constants.c:383
#5  0x003329e0 in zend_register_constant (c=0xffca35f8,
tsrm_ls=0x506060) at /home/andrey/dev/6/Zend/zend_constants.c:425
#6  0x00331468 in zend_register_standard_constants (tsrm_ls=0x506060)
at /home/andrey/dev/6/Zend/zend_constants.c:143
#7  0x00357378 in zend_startup (utility_functions=0xffca3724,
extensions=0x0, start_builtin_functions=1) at
/home/andrey/dev/6/Zend/zend.c:1105
#8  0x002a61b0 in php_module_startup (sf=0x503b84,
additional_modules=0x0, num_additional_modules=0) at
/home/andrey/dev/6/main/main.c:1598
#9  0x0042d07c in main (argc=2, argv=0xffca3a84) at
/home/andrey/dev/6/sapi/cli/php_cli.c:709



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


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

Reply via email to