Bug #13596: php crash on second accessing of allocated memory

From: Date: Mon, 08 Oct 2001 11:33:08 +0000
Subject: Bug #13596: php crash on second accessing of allocated memory
Groups: php.dev 
Request: Send a blank email to php-dev+get-67529@lists.php.net to get a copy of this message
From: ozoon@vnet.ee Operating system: redhat 7.1 PHP version: 4.0.6 PHP Bug Type: Semaphore related Bug description: php crash on second accessing of allocated memory Hi. Its seems to be impossible to use shmop_write if you are opening memory segment secong time. example code (produces crash): $mid = 0xffe; $shm_id = shmop_open($mid, "c", 0644, 100); if(!$shm_id) { echo "Couldn't create shared memory segment\n"; } $shm_bytes_written = shmop_write($shm_id, "my shared memory block", 0); if($shm_bytes_written != strlen("my shared memory block")) { echo "Couldn't write the entire length of data\n"; } shmop_close($shm_id); $shm_id = shmop_open($mid, "a", 0, 0); $shm_bytes_written = shmop_write($shm_id, "my shared memory block", 0); if($shm_bytes_written != strlen("my shared memory block")) { echo "Couldn't write the entire length of data\n"; } shmop_close($shm_id); I did somehting wrong? or i should use other release of PHP? O. -- Edit bug report at: http://bugs.php.net/?id=13596&edit=1

« previous php.dev (#67529) next »