# segfault in stream_socket_accept (fixed before 5.0.4?)

- Thread: https://externals.io/message/14409
- Original archive: https://news-web.php.net/php.internals/14409
- Started by Ron Korving on 2005-01-21T11:54:02+00:00
- Messages: 6
- 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

---

## #14409 — Ron Korving — 2005-01-21T11:54:02+00:00

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

Hi,

I know this isn't the proper channel for a bugreport, but I think this
segfault will require a very simple fix and I hope this could be fixed
before 5.0.4 is released (so I'm posting this because of the time factor).

This code segfaults (PHP 5.0.3):

<?
  $server = stream_socket_server("tcp://0.0.0.0:12345");
  $client = stream_socket_accept($server, 3, $peername);
?>

while this doesn't:

<?
  $server = stream_socket_server("tcp://0.0.0.0:12345");
  $client = stream_socket_accept($server, 3);
?>

So the problem is obviously in the feedback variable "peername". I was
hoping this might be fixed before 5.0.4 rolls out.

Thanks,

Ron Korving

---

## #14410 — Antony Dovgal — 2005-01-21T12:25:10+00:00

URL: https://externals.io/message/14409#14410 · In reply to: #14409

On Fri, 21 Jan 2005 12:54:02 +0100
"Ron Korving" <r.korving@xit.nl> wrote:

> Hi,
> 
> I know this isn't the proper channel for a bugreport, but I think this
> segfault will require a very simple fix and I hope this could be fixed
> before 5.0.4 is released (so I'm posting this because of the time
> factor).

Did I miss something or there wasn't even RC1 yet?

> This code segfaults (PHP 5.0.3):
> 
> <?
>   $server = stream_socket_server("tcp://0.0.0.0:12345");
>   $client = stream_socket_accept($server, 3, $peername);
> ?>

Please, fill a bug-report and don't forget to include backtrace.
Btw, I can't reproduce it with current CVS.

-- 
Wbr, 
Antony Dovgal aka tony2001
antony@zend.com

---

## #14411 — Ron Korving — 2005-01-21T12:55:30+00:00

URL: https://externals.io/message/14409#14411 · In reply to: #14410

"Antony Dovgal" <antony@zend.com> schreef in bericht
news:20050121152510.368a413b.antony@zend.com...
> On Fri, 21 Jan 2005 12:54:02 +0100
> "Ron Korving" <r.korving@xit.nl> wrote:
>
> > […]
>
> Did I miss something or there wasn't even RC1 yet?

I don't know exactly when PHP 5.0.4 will be released, but I understood from
Andi's posts that he wanted to get 5.0.4 out pretty soon.

> > […]
>
> Please, fill a bug-report and don't forget to include backtrace.
> Btw, I can't reproduce it with current CVS.

Could you tell me how I can create a backtrace? (I use a precompiled PHP
5.0.3, so I'm not sure if I can do this with my software). I noticed there
are backtrace php functions, but how can I call a function after php
segfaults?

Thanks,

Ron

---

## #14412 — Derick Rethans — 2005-01-21T13:00:41+00:00

URL: https://externals.io/message/14409#14412 · In reply to: #14411

> Could you tell me how I can create a backtrace? (I use a precompiled PHP
> 5.0.3, so I'm not sure if I can do this with my software). I noticed there
> are backtrace php functions, but how can I call a function after php
> segfaults?

Read the instructions that our bugreport form refers to:
http://bugs.php.net/bugs-generating-backtrace.php

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #14413 — Ron Korving — 2005-01-21T13:16:13+00:00

URL: https://externals.io/message/14409#14413 · In reply to: #14412

Unfortunately right now I don't have the time to do this. I posted a
bugreport ( http://bugs.php.net/31633 ). Maybe I can try to add a backtrace
later.

Thank you,

Ron

"Derick Rethans" <derick@php.net> schreef in bericht
news:Pine.LNX.4.58.0501211400030.28848@localhost...
> 
>
> > […]
there
> > […]
>
> Read the instructions that our bugreport form refers to:
> http://bugs.php.net/bugs-generating-backtrace.php
>
> -- 
> Derick Rethans
> http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #14415 — Wez Furlong — 2005-01-21T14:18:31+00:00

URL: https://externals.io/message/14409#14415 · In reply to: #14410

I think I fixed this problem up to a month ago in HEAD.

--Wez.



> On Fri, 21 Jan 2005 12:54:02 +0100
> "Ron Korving" <r.korving@xit.nl> wrote:
> 
> > […]
> 
> Did I miss something or there wasn't even RC1 yet?
> 
> > […]
> 
> Please, fill a bug-report and don't forget to include backtrace.
> Btw, I can't reproduce it with current CVS.
> 
> --
> Wbr,
> Antony Dovgal aka tony2001
> antony@zend.com
