php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71921 shmop_delete() not delete memory block
Submitted: 2016-03-29 14:34 UTC Modified: 2018-09-18 17:01 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: wcode404 at gmail dot com Assigned: cmb (profile)
Status: Duplicate Package: Unknown/Other Function
PHP Version: 5.6.14 OS: Windows 7 Professional x64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wcode404 at gmail dot com
New email:
PHP Version: OS:

 

 [2016-03-29 14:34 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-29 15:09 UTC] wcode404 at gmail dot com
-Operating System: Windows 7 +Operating System: Windows 7 Professional x64 -PHP Version: 5.6.19 +PHP Version: 5.6.14
 [2016-03-29 15:09 UTC] 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
 [2018-09-18 17:01 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2018-09-18 17:01 UTC] cmb@php.net
Duplicate of bug #65987.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Mar 14 15:01:30 2025 UTC