Bug #71921 [Opn]: shmop_delete() not delete memory block

From: Date: Tue, 29 Mar 2016 15:09:19 +0000
Subject: Bug #71921 [Opn]: shmop_delete() not delete memory block
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200220@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 User updated by: wcode404 at gmail dot com Reported by: wcode404 at gmail dot com Summary: shmop_delete() not delete memory block Status: Open Type: Bug Package: Unknown/Other Function -Operating System: Windows 7 +Operating System: Windows 7 Professional x64 -PHP Version: 5.6.19 +PHP Version: 5.6.14 Block user comment: N Private report: N New Comment: $ 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 Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#200220) next »