From:             [EMAIL PROTECTED]
Operating system: Linux 2.4.17 mdk
PHP version:      4.1.1
PHP Bug Type:     Reproducible crash
Bug description:  sem_remove() crashes in php 4.1.1 standalone

The Bug #10044 in shm_remove seems to have happened
in sem_remove too. An automatic clean up after a request
in php 4.1.1 of all acquired semphores does succeed.
An explicit clean up with sem_remove() in php as a
standalone script fails with a core dump.

<?php
// semaphore remove bug in standalone php only

$channel_id=crc32("This is a test");
$sem_id = sem_get($channel_id,1,0600);
print "$sem_id got<br>\n";
sem_acquire($sem_id);
print "$sem_id acquired<br>\n";
sem_release($sem_id);
print "$sem_id released<br>\n";
sem_remove($sem_id);
print "$sem_id removed<br>\n";
//request cleanup dumps core if semaphore is removed
?>


-- 
Edit bug report at http://bugs.php.net/?id=16144&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16144&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16144&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16144&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16144&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16144&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16144&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16144&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16144&r=submittedtwice

Reply via email to