Re: Bug #14784 Updated: shmop_write causes segfault
| From: | Prottoss | Date: | Tue, 01 Jan 2002 21:01:25 +0000 |
| Subject: | Re: Bug #14784 Updated: shmop_write causes segfault | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-75525@lists.php.net to get a copy of this message | ||
I found the reason behind your bug.
When you are checking if the segment exists or not you are using
$testID = shmop_open( 0xff3, "ac", 0, 0);
instead of
$testID = shmop_open( 0xff3, "a", 0, 0);
which simply tried to open the segment and will return FALSE if it fails.
Once I changed your code to mine, the segfault stopped appearing.
If you have any further questions you can email me, I am one of the shmop
module authors. I believe the bug is occuring because you are passing an
invalid flag to shmop_open(). I ask that someone would remove the misleading
comment on shmop_open() page which tells people to use 'ac' flag to see if
segment exists or not. Also, to whom should I submit a patch that will
prevent this from happening in the future?
Prottoss
webmaster@mediaminer.org
ICQ: 23361082
http://mediaminer.org/
On January 1, 2002 03:17 pm, markhers@thinkbug.com wrote:
> ID: 14784
> User updated by: markhers@thinkbug.com
> Reported By: markhers@thinkbug.com
> Status: Open
> Bug Type: Reproducible crash
> Operating System: Linux (RH 6.2 / 2.4.3)
> PHP Version: 4.1.1
> New Comment:
--