Bug #71955 [Opn]: shmop_open: creating infinite amount of segments

From: Date: Mon, 04 Apr 2016 11:24:21 +0000
Subject: Bug #71955 [Opn]: shmop_open: creating infinite amount of segments
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200344@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71955&edit=1 ID: 71955 User updated by: kakkau at grr dot la Reported by: kakkau at grr dot la Summary: shmop_open: creating infinite amount of segments Status: Open Type: Bug Package: Unknown/Other Function PHP Version: Irrelevant Block user comment: N Private report: N New Comment: For segments that were opened via $key=0 it is additionally not possible to attach to them. This snippet <?php shmop_open(0,"n",0600,1024); shmop_open(0,"a",0600,1024); ?> additionally fails with Warning: shmop_open(): unable to attach or create shared memory segment in php shell code on line 1 Previous Comments: ------------------------------------------------------------------------ [2016-04-04 09:10:14] kakkau at grr dot la Description: ------------ 1. Run shmop_open with $key=0 and $flags="n" multiple times. 2. Wonder about a missing warning when using the same key for creation. 3. Check the output of ipcs -m. There should show up multiple segments now. For other integers <> 0 shmop_open works as expected Test script: --------------- <?php $res = shmop_open(0,"n",0600,1024); $res = shmop_open(0,"n",0600,1024); ?> Expected result: ---------------- At least a warning should be thrown w/o creating another segment. Warning: shmop_open(): unable to attach or create shared memory segment in php shell code on line 1 Call Stack: 10.9282 120780 1. {main}() php shell code:0 10.9282 120920 2. shmop_open() php shell code:1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71955&edit=1

« previous php.bugs (#200344) next »