php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10115 segmentation fault
Submitted: 2001-04-02 09:23 UTC Modified: 2001-04-29 10:20 UTC
From: root at anight dot org Assigned:
Status: Closed Package: Semaphore related
PHP Version: 4.0.4pl1 OS: linux 2.4.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 - 4 = ?
Subscribe to this entry?

 
 [2001-04-02 09:23 UTC] root at anight dot org
got segfault using shm_attach():

1) script started as user A creating shared memory block: shm_attach($mem_id, $mem_size, 0600);
2) same script, but started as user B trying shm_attach($mem_id, $mem_size, 0600);
(it cannot be done, because access rights is 0600 - memory is for owner only)
the result is segmentation fault.

PHP/4.0.4pl1
Linux 2.2.16

php config:
./configure \
--disable-session \
--disable-pear \
--disable-pic \
--with-gdbm --disable-dbm \
--with-mysql=/usr/local \
--with-mcrypt=/usr/local \
--disable-debug \
--enable-sysvshm \
--enable-sysvsem \
--disable-xml


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-28 19:22 UTC] elixer@php.net
Could you provide a small sample script (just enough code for this to fail.) for us to analyze?

Sean
 [2001-04-29 09:41 UTC] root at anight dot org
#!/usr/local/bin/php -q
<?
 shm_attach(1234, 1000, 0600);
?>

to reproduce bug you should first start this script as user A. then, login as user B and start it again.

i noticed that 4.0.5RC5 has no segfault at this point.
instead, correct message appears:
<br>
<b>Warning</b>:  shmget() failed for key 0x4d2: Permission denied in <b>./test.php</b> on line <b>2</b><br>

so, i think this bug is closed.
 [2001-04-29 09:43 UTC] root at anight dot org
note also: not A nor B CAN'T BE a root, or example shouldn't work
 [2001-04-29 10:20 UTC] jmoore@php.net
lets close the bug then.

- James
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC