Bug #71921 [NEW]: shmop_delete() not delete memory block
| From: | wcode404 at gmail dot com | Date: | Tue, 29 Mar 2016 14:34:31 +0000 |
| Subject: | Bug #71921 [NEW]: shmop_delete() not delete memory block | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-200217@lists.php.net to get a copy of this message | ||
From: wcode404 at gmail dot com
Operating system: Windows 7
PHP version: 5.6.19
Package: Unknown/Other Function
Bug Type: Bug
Bug description:shmop_delete() not delete memory block
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 bug report at https://bugs.php.net/bug.php?id=71921&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71921&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71921&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71921&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71921&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71921&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71921&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71921&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71921&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71921&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71921&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71921&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71921&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71921&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71921&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71921&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71921&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71921&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71921&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71921&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71921&r=mysqlcfg