php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75812 shmop_delete doesn't delete memory segment
Submitted: 2018-01-13 19:22 UTC Modified: 2018-09-18 17:02 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: gajowy at agzeta dot pl Assigned: cmb (profile)
Status: Duplicate Package: *Extensibility Functions
PHP Version: 7.1.13 OS: Windows 10 64bit
Private report: No CVE-ID: None
 [2018-01-13 19:22 UTC] gajowy at agzeta dot pl
Description:
------------
shmop_delete() function doesn't delete shared memory block.

The function returns true however the block is not deleted and one can still read/write to it and can not create a new one (shmop_open) with the same key.

Test script:
---------------
$mid=shmop_open(1,'n',0644,128);
var_dump( shmop_delete($mid) );
var_dump( $mid );

$mid=shmop_open(1,'n',0644,128);
var_dump($mid);


Expected result:
----------------
bool(true)
resource(4) of type (Unknown)
resource(5) of type (shmop)


Actual result:
--------------
bool(true)
resource(4) of type (shmop)
PHP Warning:  shmop_open(): unable to attach or create shared memory segment 'No error' in test.php on line 6

bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-18 17:02 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Package: Variables related +Package: *Extensibility Functions -Assigned To: +Assigned To: cmb
 [2018-09-18 17:02 UTC] cmb@php.net
Duplicate of bug #65987.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jun 27 02:01:25 2019 UTC