Bug #71921 [Opn->Dup]: shmop_delete() not delete memory block
| From: | cmb@php.net | Date: | Tue, 18 Sep 2018 17:01:56 +0000 |
| Subject: | Bug #71921 [Opn->Dup]: shmop_delete() not delete memory block | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217125@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71921&edit=1
ID: 71921
Updated by: cmb@php.net
Reported by: wcode404 at gmail dot com
Summary: shmop_delete() not delete memory block
-Status: Open
+Status: Duplicate
Type: Bug
Package: Unknown/Other Function
Operating System: Windows 7 Professional x64
PHP Version: 5.6.14
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Duplicate of bug #65987.
Previous Comments:
------------------------------------------------------------------------
[2016-03-29 15:09:19] wcode404 at gmail dot com
$ php -v
PHP 5.6.14 (cli) (built: Sep 30 2015 14:32:12)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
------------------------------------------------------------------------
[2016-03-29 14:34:28] wcode404 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.shmop-delete
---
shmop_delete() not delete memory block
Perhaps the reason is that i do not have administrator rights in a Windows.
Test script:
---------------
$key = 0xFF;
$data = 'foo';
$shmid = shmop_open($key, 'w', 0644, strlen($data));
assert(shmop_write($shmid, $data, 0), 'Failed write');
unset($shmid);
$shmid = shmop_open($key, 'c', 0644, strlen($data));
assert($data == shmop_read($shmid, 0, shmop_size($shmid)), 'Failed read');
unset($shmid);
$shmid = shmop_open($key, 'c', 0644, strlen($data));
assert(shmop_delete($shmid), 'Failed delete');
unset($shmid);
$shmid = shmop_open($key, 'c', 0644, strlen($data));
assert($data != shmop_read($shmid, 0, shmop_size($shmid)), 'Still exists');
Expected result:
----------------
No errors and empty result
Actual result:
--------------
Warning: assert(): Still exists failed
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71921&edit=1