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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
43 - 30 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 19:01:30 2024 UTC