# PHP 5.0.0 Test roll

- Thread: https://externals.io/message/11137
- Original archive: https://news-web.php.net/php.internals/11137
- Started by Andi Gutmans on 2004-07-12T21:11:49+00:00
- Messages: 31
- Page 1 of 2: messages 1 to 25 (25 per page, add `?page=N` to the URL)
- Next page: https://externals.io/message/11137.md?page=2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #11137 — Andi Gutmans — 2004-07-12T21:11:49+00:00

URL: https://externals.io/message/11137#11137

I did a test roll of PHP 5.0.0 (without version change). Please download 
and make sure there are no serious show stoppers. You can grab it at 
http://snaps.php.net/~andi/
Edin, it might be a good idea for you to roll a test package too.
If all goes well, I'll do version changes and will roll the release within 
about 24 hours.
Good luck!
Andi

---

## #11146 — Derrell.Lipman@UnwiredUniverse.com — 2004-07-13T02:57:09+00:00

URL: https://externals.io/message/11137#11146 · In reply to: #11137

Andi Gutmans <andi@zend.com> writes:

> I did a test roll of PHP 5.0.0 (without version change). Please download and
> make sure there are no serious show stoppers. You can grab it at
> http://snaps.php.net/~andi/

5.0.0 Test Roll is working fine for me, including the sqlite 2.8.14 upgrade.

Thanks!

Derrell

---

## #11148 — Benj Carson — 2004-07-13T05:33:06+00:00

URL: https://externals.io/message/11137#11148 · In reply to: #11137

The `file_get_contents()` bug still seems to be present in the test roll, but 
not in the latest snap:

Reproduce code (from the bug report for 29099):
--------------

#!/usr/bin/php
<?php
$ch = curl_init("http://www.php.net/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$str1 = curl_exec($ch);
curl_close($ch);

$str2 = file_get_contents("http://www.php.net/");

echo $str2;  // Note garbage at end of string

if ($str1 != $str2) {
    echo "Both results differ.\n";
} else {
    echo "Both results are the same.\n";
}



The latest snap (200407130430) seems to be just fine though.


Benj Carson

---

## #11155 — Derick Rethans — 2004-07-13T08:00:38+00:00

URL: https://externals.io/message/11137#11155 · In reply to: #11137

> I did a test roll of PHP 5.0.0 (without version change). Please download
> and make sure there are no serious show stoppers. You can grab it at
> http://snaps.php.net/~andi/

I moved those to http://www.php.net/~andi/ and renamed them from RC4
(which it is not of course) to -pre-release-test in order to avoid
confusion later on.

regards,
Derick

---

## #11156 — Edin Kadribasic — 2004-07-13T08:32:34+00:00

URL: https://externals.io/message/11137#11156 · In reply to: #11137

> I did a test roll of PHP 5.0.0 (without version change). Please download
> and make sure there are no serious show stoppers. You can grab it at
> http://snaps.php.net/~andi/
> Edin, it might be a good idea for you to roll a test package too.
> If all goes well, I'll do version changes and will roll the release within
> about 24 hours.

Windows build from the CVS as of 6:00 GMT:

http://www.php.net/~edink/php-5.0.0-Win32-prerelease-test.zip

Edin

---

## #11159 — Sebastian Bergmann — 2004-07-13T10:59:37+00:00

URL: https://externals.io/message/11137#11159 · In reply to: #11137

Andi Gutmans wrote:
> If all goes well, I'll do version changes and will roll the release 
> within about 24 hours.

  Current HEAD still segfaults with "php -m" on Windows:

    http://bugs.php.net/bug.php?id=29088

-- 
Sebastian Bergmann
http://sebastian-bergmann.de/                   http://phpOpenTracker.de/

Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/

---

## #11161 — Stefan Esser — 2004-07-13T11:27:03+00:00

URL: https://externals.io/message/11137#11161 · In reply to: #11159

Hi,

>  Current HEAD still segfaults with "php -m" on Windows:

this is not reproduceable with latest snapshotbuild on Windows XP.

Stefan

---

## #11162 — Antony Dovgal — 2004-07-13T11:34:28+00:00

URL: https://externals.io/message/11137#11162 · In reply to: #11137

Hi all!

That's what valgrind says:

1) 
Zend/tests/bug26166.phpt

Zend/zend_execute.c:1352 	
EX(Ts) = (temp_variable *) safe_emalloc(sizeof(temp_variable),
op_array->T, 0);

==8511== 40 bytes in 1 blocks are still reachable in loss record 2 of 7
==8511==    at 0x3C01E375: malloc (vg_replace_malloc.c:105)
==8511==    by 0x8222A55: _emalloc (zend_alloc.c:182)
==8511==    by 0x8222C77: _safe_emalloc (zend_alloc.c:238)
==8511==    by 0x8266E78: execute (zend_execute.c:1352)

2)
Zend/tests/bug20240.phpt

==8478== 40 bytes in 1 blocks are still reachable in loss record 2 of 7
==8478==    at 0x3C01E375: malloc (vg_replace_malloc.c:105)
==8478==    by 0x8222A55: _emalloc (zend_alloc.c:182)
==8478==    by 0x8231488: call_user_function (zend_execute_API.c:517)
==8478==    by 0x816D03B: user_shutdown_function_call
(basic_functions.c:2088)

3)
Zend/tests/bug22836.phpt:

Zend/zend_execute.c(609) :  Freeing 0x3D172090 (4 bytes), 
script=php-src/Zend/tests/bug22836.php
php-src/Zend/zend_variables.c(137) : Actual location (location was
relayed) 
php-src/Zend/zend_execute.c(264) :  Freeing 0x3D1726F4 (16 bytes),
script=php-src/Zend/tests/bug22836.php


There are some more issues, I'm still waiting for valgrind to
finish its work (it's sloooow)..

---
WBR,
Antony Dovgal aka tony2001
tony2001@phpclub.net || antony@dovgal.com

---

## #11163 — Nuno Lopes — 2004-07-13T11:39:40+00:00

URL: https://externals.io/message/11137#11163 · In reply to: #11161

> > […]
>
> this is not reproduceable with latest snapshotbuild on Windows XP.
>
> Stefan


Using php5-win32-200407131030.zip, PHP still segfaults on my pc:

Program received signal SIGSEGV, Segmentation fault.
0x1003e2fd in zend_hash_destroy () from /cygdrive/c/php/php5ts.dll
(gdb) bt
#0  0x1003e2fd in zend_hash_destroy () from /cygdrive/c/php/php5ts.dll
#1  0x0012ff4c in ?? ()
#2  0x00362678 in ?? ()
#3  0x1007145a in php_stream_copy_to_stream () from
/cygdrive/c/php/php5ts.dll
#4  0xbaadf00d in ?? ()
#5  0x00362678 in ?? ()
#6  0x10338598 in php_info_print_table_row ()
#7  0x10061ead in php_log_err () from /cygdrive/c/php/php5ts.dll

Nuno

---

## #11165 — Derick Rethans — 2004-07-13T11:45:16+00:00

URL: https://externals.io/message/11137#11165

> "Sebastian Bergmann" <sb@sebastian-bergmann.de> a écrit dans le message de
> news:
> > […]
>
> Hi,
> i've tried php -m on my windows with the prerelease-test version, it doesn'
> t segfault but there are some warning messages before printing the result
> (it might...must...be an error from me ?) . Hope it will help :

You try to use PHP modules from old versions.

Derick

---

## #11168 — Antony Dovgal — 2004-07-13T12:15:58+00:00

URL: https://externals.io/message/11137#11168 · In reply to: #11162

Some more:

php-src/ext/soap/tests/server014.phpt:

==10122== Invalid read of size 4
==10122==    at 0x8230D88: _zval_ptr_dtor (zend_execute_API.c:389)
==10122==    by 0x823D45E: _zval_ptr_dtor_wrapper (zend_variables.c:193)
==10122==    by 0x8247C41: zend_hash_destroy (zend_hash.c:519)
==10122==    by 0x8255F67: zend_objects_free_object_storage
(zend_objects.c:88)==10122==  Address 0x4FFFB588 is not stack'd,
malloc'd or free'd==10122==
==10122== Invalid read of size 4
==10122==    at 0x8230D90: _zval_ptr_dtor (zend_execute_API.c:390)
==10122==    by 0x823D45E: _zval_ptr_dtor_wrapper (zend_variables.c:193)
==10122==    by 0x8247C41: zend_hash_destroy (zend_hash.c:519)
==10122==    by 0x8255F67: zend_objects_free_object_storage
(zend_objects.c:88)==10122==  Address 0x4FFFB588 is not stack'd,
malloc'd or free'd==10122==
==10122== Invalid read of size 4
==10122==    at 0x8230DE9: _zval_ptr_dtor (zend_execute_API.c:393)
==10122==    by 0x823D45E: _zval_ptr_dtor_wrapper (zend_variables.c:193)
==10122==    by 0x8247C41: zend_hash_destroy (zend_hash.c:519)
==10122==    by 0x8255F67: zend_objects_free_object_storage
(zend_objects.c:88)==10122==  Address 0x4FFFB588 is not stack'd,
malloc'd or free'd==10122==
==10122== Invalid write of size 1
==10122==    at 0x8230DF4: _zval_ptr_dtor (zend_execute_API.c:394)
==10122==    by 0x823D45E: _zval_ptr_dtor_wrapper (zend_variables.c:193)
==10122==    by 0x8247C41: zend_hash_destroy (zend_hash.c:519)
==10122==    by 0x8255F67: zend_objects_free_object_storage
(zend_objects.c:88)==10122==  Address 0x4FFFB58D is not stack'd,
malloc'd or free'd

---
WBR,
Antony Dovgal aka tony2001
tony2001@phpclub.net || antony@dovgal.com

---

## #11171 — Andi Gutmans — 2004-07-13T15:10:29+00:00

URL: https://externals.io/message/11137#11171 · In reply to: #11137

Okay. Tag wise it's RC4 because I couldn't come up with something better 
and didn't want to screw up the CVS tag names.

At 10:00 AM 7/13/2004 +0200, Derick Rethans wrote:
>
>
> > […]
>
>I moved those to http://www.php.net/~andi/ and renamed them from RC4
>(which it is not of course) to -pre-release-test in order to avoid
>confusion later on.
>
>regards,
>Derick

---

## #11176 — Andi Gutmans — 2004-07-13T15:32:22+00:00

URL: https://externals.io/message/11137#11176 · In reply to: #11137

Can someone reproduce this? I couldn't. Not in debug nor in release.

At 12:59 PM 7/13/2004 +0200, Sebastian Bergmann wrote:
>Andi Gutmans wrote:
> > […]
>
>  Current HEAD still segfaults with "php -m" on Windows:
>
>    http://bugs.php.net/bug.php?id=29088
>
>--
>Sebastian Bergmann
>http://sebastian-bergmann.de/                   http://phpOpenTracker.de/
>
>Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/

---

## #11179 — romain bourdon — 2004-07-13T15:50:50+00:00

URL: https://externals.io/message/11137#11179 · In reply to: #11176

I tried pre-release-test package on "php -m" : Does not segfault at home
with standard conf.
So I tried activating all extensions. I had a lot of dependencies Warnings
(normal) but no segfault...


> Can someone reproduce this? I couldn't. Not in debug nor in release.
>
> At 12:59 PM 7/13/2004 +0200, Sebastian Bergmann wrote:
> > […]

---

## #11180 — Rob Richards — 2004-07-13T15:56:40+00:00

URL: https://externals.io/message/11137#11180 · In reply to: #11176

I can repeatedly reproduce this with cli (php -m) and apache2 (just starting
and stopping it) apache 2 crash probably same as bug 29025 - though with or
without xsl doesnt matter). cgi seems to be fine. Always same stack trace.

php5ts_debug.dll!_zend_is_inconsistent(_hashtable * ht=0xcdcdcdcd, char *
file=0x1053aaf0, int line=510)  Line 53 + 0x3 C
php5ts_debug.dll!zend_hash_destroy(_hashtable * ht=0xcdcdcdcd)  Line 510 +
0x19 C
php5ts_debug.dll!php_shutdown_stream_wrappers(int module_number=0, void * *
* tsrm_ls=0x00954278)  Line 1379 + 0x12 C
php5ts_debug.dll!php_module_shutdown(void * * * tsrm_ls=0x00954278)  Line
1516 + 0xd C
php5ts_debug.dll!php_module_shutdown(void * * * tsrm_ls=0x00954278)  Line
1516 + 0xd C
php-cli.exe!main()  Line 1052 + 0xd C
php-cli.exe!mainCRTStartup()  Line 338 + 0x11 C

Rob

----- Original Message ----- 
From: Andi Gutmans

> Can someone reproduce this? I couldn't. Not in debug nor in release.

---

## #11181 — Nuno Lopes — 2004-07-13T15:57:26+00:00

URL: https://externals.io/message/11137#11181 · In reply to: #11176

> Can someone reproduce this? I couldn't. Not in debug nor in release.

I can!
http://news.php.net/php.internals/11163 


> At 12:59 PM 7/13/2004 +0200, Sebastian Bergmann wrote:
> > […]

---

## #11183 — Andi Gutmans — 2004-07-13T16:04:52+00:00

URL: https://externals.io/message/11137#11183 · In reply to: #11161

Are you sure you're not loading old extensions?

At 12:39 PM 7/13/2004 +0100, Nuno Lopes wrote:
> > […]
>
>
>Using php5-win32-200407131030.zip, PHP still segfaults on my pc:
>
>Program received signal SIGSEGV, Segmentation fault.
>0x1003e2fd in zend_hash_destroy () from /cygdrive/c/php/php5ts.dll
>(gdb) bt
>#0  0x1003e2fd in zend_hash_destroy () from /cygdrive/c/php/php5ts.dll
>#1  0x0012ff4c in ?? ()
>#2  0x00362678 in ?? ()
>#3  0x1007145a in php_stream_copy_to_stream () from
>/cygdrive/c/php/php5ts.dll
>#4  0xbaadf00d in ?? ()
>#5  0x00362678 in ?? ()
>#6  0x10338598 in php_info_print_table_row ()
>#7  0x10061ead in php_log_err () from /cygdrive/c/php/php5ts.dll
>
>Nuno

---

## #11184 — Nuno Lopes — 2004-07-13T16:13:57+00:00

URL: https://externals.io/message/11137#11184 · In reply to: #11183

> Are you sure you're not loading old extensions?

Completly sure! I've also tried to disable all extensions and it still
segfaults.



> At 12:39 PM 7/13/2004 +0100, Nuno Lopes wrote:
> > […]

---

## #11185 — Andi Gutmans — 2004-07-13T16:14:41+00:00

URL: https://externals.io/message/11137#11185 · In reply to: #11183

Can you try and debug? I just can't get it to crash here :)

At 05:13 PM 7/13/2004 +0100, Nuno Lopes wrote:

> > […]
>
>Completly sure! I've also tried to disable all extensions and it still
>segfaults.
>
>
>
> > […]

---

## #11186 — Derrell.Lipman@UnwiredUniverse.com — 2004-07-13T16:23:05+00:00

URL: https://externals.io/message/11137#11186 · In reply to: #11180

"Rob Richards" <rrichards@ctindustries.net> writes:

> php5ts_debug.dll!_zend_is_inconsistent(_hashtable * ht=0xcdcdcdcd, char *
> file=0x1053aaf0, int line=510)  Line 53 + 0x3 C
> php5ts_debug.dll!zend_hash_destroy(_hashtable * ht=0xcdcdcdcd)  Line 510 +
> 0x19 C
> php5ts_debug.dll!php_shutdown_stream_wrappers(int module_number=0, void * *
> * tsrm_ls=0x00954278)  Line 1379 + 0x12 C
> php5ts_debug.dll!php_module_shutdown(void * * * tsrm_ls=0x00954278)  Line
> 1516 + 0xd C
> php5ts_debug.dll!php_module_shutdown(void * * * tsrm_ls=0x00954278)  Line
> 1516 + 0xd C
> php-cli.exe!main()  Line 1052 + 0xd C
> php-cli.exe!mainCRTStartup()  Line 338 + 0x11 C

I don't know the internals of PHP, but a hash table parameter of 0xcdcdcdcd
looks an awful lot to me like there's a debug malloc library of some sort that
fills freed memory with '\xcd', meaning that zend_hash_destroy() is being
called with previously freed memory.

Since php_shutdown_stream_wrappers() calls zend_hash_destroy() three times,
but the first and third call (directly or indirectly) pass a parameter which
is simply the address of a variable, my first guess would be that this call:

  zend_hash_destroy(php_get_stream_filters_hash())

is the culprit, which implicates the variable 'stream_filters" in some way,
shape or form (via the function _php_get_stream_filters_hash() in
filters.c:41.

I hope maybe this helps someone who knows the code determine the problem.  I
did a cursory search for something pertaining to 0xcd and could not find it,
but maybe someone more familiar with the code will recognize 0xcdcdcdcd...

Cheers,

Derrell

---

## #11188 — Robert Janeczek — 2004-07-13T16:40:59+00:00

URL: https://externals.io/message/11137#11188 · In reply to: #11156

> Windows build from the CVS as of 6:00 GMT:
>
> http://www.php.net/~edink/php-5.0.0-Win32-prerelease-test.zip

http://bugs.php.net/bug.php?id=29025 is still present

rash

---

## #11193 — Antony Dovgal — 2004-07-13T17:08:45+00:00

URL: https://externals.io/message/11137#11193 · In reply to: #11162

On Tue, 13 Jul 2004 15:34:28 +0400
Antony Dovgal <tony2001@phpclub.net> wrote:

> Hi all!
> 
> That's what valgrind says:
> 
> 1) 
> Zend/tests/bug26166.phpt
> 
> Zend/zend_execute.c:1352 	
> EX(Ts) = (temp_variable *) safe_emalloc(sizeof(temp_variable),
> op_array->T, 0);
> 
> ==8511== 40 bytes in 1 blocks are still reachable in loss record 2 of
> 7==8511==    at 0x3C01E375: malloc (vg_replace_malloc.c:105)
> ==8511==    by 0x8222A55: _emalloc (zend_alloc.c:182)
> ==8511==    by 0x8222C77: _safe_emalloc (zend_alloc.c:238)
> ==8511==    by 0x8266E78: execute (zend_execute.c:1352)
> 
> 2)
> Zend/tests/bug20240.phpt
> 
> ==8478== 40 bytes in 1 blocks are still reachable in loss record 2 of
> 7==8478==    at 0x3C01E375: malloc (vg_replace_malloc.c:105)
> ==8478==    by 0x8222A55: _emalloc (zend_alloc.c:182)
> ==8478==    by 0x8231488: call_user_function (zend_execute_API.c:517)
> ==8478==    by 0x816D03B: user_shutdown_function_call
> (basic_functions.c:2088)

Dunno if it's the right thing to add if()'s around emalloc(), but with
attached patch these warnings disappear, reducing valgrind logs in a
half.

---
WBR,
Antony Dovgal aka tony2001
tony2001@phpclub.net || antony@dovgal.com

---

## #11204 — Chris — 2004-07-13T20:51:48+00:00

URL: https://externals.io/message/11137#11204 · In reply to: #11156

Edin Kadribasic wrote:

>
>  
>
> > […]
>
>Windows build from the CVS as of 6:00 GMT:
>
>http://www.php.net/~edink/php-5.0.0-Win32-prerelease-test.zip
>
>Edin
>
Hi, I'm new to the list, so forgive me if I'm going about this the wrong 
way.


I'm still experiencing  the bug: http://bugs.php.net/bug.php?id=28829  
(Crashes when BC Math functions get an argument of 0) with this 
release.  I have no problems duplicating it and should be around for a 
while if  someone needs more information, or is unable to duplicate it.

Chris

P.S. I'm not really a C++ guy, I have Visual Studio 6 installed on this 
machine, so I have access to its tools, but I'm not very good at using 
them. I mostly joined this list to lurk, but I'm willing to help where 
I'm able.

---

## #11205 — Daniel Crookston — 2004-07-13T21:07:38+00:00

URL: https://externals.io/message/11137#11205 · In reply to: #11204

I'm glad you spoke up first Chris, because I have questions in a similar 
vein.  Namely, how can I help?  I have a few years of C under my belt, but 
I never got to the point where I'd be comfy hacking PHP.  (I'd like to get 
there eventually, I'm just not there yet.)

So, am I being lazy, have I missed some docs on the web regarding how to 
be useful, or how to become familiar enough with the PHP code to start 
lending a hand with the debugging?  Or are we expected to learn it 
ourselves, on our own, in order to be accepted into "the club" as it were? 
(Not that there's anything wrong with that, it's just that a lot of groups 
require self-validation like that.)

Thanks for any help,
Dan

--
The dark language of memory allocation is not to be spoken here.


> P.S. I'm not really a C++ guy, I have Visual Studio 6 installed on this 
> machine, so I have access to its tools, but I'm not very good at using them. 
> I mostly joined this list to lurk, but I'm willing to help where I'm able.

---

## #11206 — Adam Maccabee Trachtenberg — 2004-07-13T21:13:56+00:00

URL: https://externals.io/message/11137#11206 · In reply to: #11205

> So, am I being lazy, have I missed some docs on the web regarding how to
> be useful, or how to become familiar enough with the PHP code to start
> lending a hand with the debugging?  Or are we expected to learn it
> ourselves, on our own, in order to be accepted into "the club" as it were?
> (Not that there's anything wrong with that, it's just that a lot of groups
> require self-validation like that.)

The general method of helping out (at first) is to review open bug
reports and post patches to this list. Someone will then review and
merge into the code base.

A pattern of good patches leads to greater CVS karma, so you can apply
them yourself.

If you're not up for that right now, you could go through open reports
and help classify them, provide reproducing test cases (and/or
backtraces), mark them as bogus, etc.

There's no good online "here's how PHP's C internals work," but
George's "Advanced PHP Programming" book is a good place to start
reading.

-adam

-- 
adam@trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!

---

Next page: https://externals.io/message/11137.md?page=2
