#26769 [Opn->WFx]: 64 bit pointer
| From: | pollita@php.net | Date: | Sat, 03 Jan 2004 05:25:17 +0000 |
| Subject: | #26769 [Opn->WFx]: 64 bit pointer | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52745@lists.php.net to get a copy of this message | ||
ID: 26769
Updated by: pollita@php.net
Reported By: yu at fstrf dot org
-Status: Open
+Status: Wont fix
Bug Type: Compile Warning
Operating System: Solaris 8/sparcv9
PHP Version: 4.3.4
New Comment:
It's a harmless warning.
rsrc->ptr is a generic use "bucket". Generally it's meant to hold a
pointer to some data. In this case, pid_t is trusted to never have a
larger storage size than void* (to do so would require 16-bit pointers
and 32-bit PIDs or 32-bit pointers and 64-bit PIDs, etc...) so rather
than malloc()ing a container for child, we just drop child itself into
the pointer bucket.
Bottom line, don't worry.
Previous Comments:
------------------------------------------------------------------------
[2004-01-02 17:12:02] yu at fstrf dot org
Description:
------------
I am compiling PHP under solaris 8 /sparcv9 for 64-bit version. I get a
successful compilation except the following warnings.
php-4.3.4/ext/standard/exec.c:588: warning: cast from pinter to integer
of different size
php-4.3.4/ext/standard/exec.c: In function `zif_proc_open':
php-4.3.4/ext/standard/exec.c:1007: warning: cast to pointer from
integer of different size
Here is the code in exec.c,
-----------------------------------------------------------
line# 586: pid_t child, wait_pid;
line# 587:
line# 588: child = (pid_t)rsrc->ptr;
.
.
.
line# 1007: ZEND_REGISTER_RESOURCE(return_value, (void*)child,
le_proc_open);
-----------------------------------------------------------
Since pid_t is defined in solaris8/sparv9 in 32 bit and pointer is 64
bit, I am worried an assignment from 64-bit pointer to a 32-bit integer
would cause segmentation fault in the runtime.
Can anybody help me on that?
Thank you,
Maggie
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26769&edit=1