php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4140 on sem_get() apache ends with a signal Bus Error (10)
Submitted: 2000-04-13 18:01 UTC Modified: 2000-04-14 09:19 UTC
From: rieder at subedvz dot tu-graz dot ac dot at Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.16 OS: Solaris 7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rieder at subedvz dot tu-graz dot ac dot at
New email:
PHP Version: OS:

 

 [2000-04-13 18:01 UTC] rieder at subedvz dot tu-graz dot ac dot at
OS: SunOS  5.7 Generic_106541-04 sun4u sparc SUNW,Ultra-2 
compiler: gcc-2.95.2-sol7-sparc
apache: 1.3.12

Configure options:
       ./configure\
        --with-oracle\
        --without-mysql\
        --with-imap\
        --with-ldap\
        --with-db2 \
        --enable-sysvsem\
        --enable-sysvshm\
        --enable-track-vars\
        --with-gd \
        --with-jpeg-dir=/usr/local/lib \
        --with-apxs=/usr/local/apache/bin/apxs



Script:

<?php

$key=0x123754;
$x = $key + 1;

//++++++++++++ 
// crash crash crash
$semid = sem_get($x);
// end crash 
//++++++++++++

sem_acquire($semid);
 
if($x=shm_attach($key, 64000, 0600)) { print "OK"; } else { print "NO"; }
 
shm_put_var($x, $test, "this_is_a_test");
print shm_get_var($x, $test);
shm_remove($key);
 
?>


Other example:

horde-1.2.0-pre10 (www.horde.org)
imp-2.2.0-pre10 (www.horde.org)
phplib-7 (http://phplib.netuse.de/)

Session management was configured to use shared memory
apache crashes with following log entry:
... [notice] child pid 18681 exit signal Bus Error (10) 

The same occours with older versions of php and/or apache.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-04-14 06:41 UTC] rieder at subedvz dot tu-graz dot ac dot at
Bug ID 4143 describes the same problem. The little hack in sysvsem.c solves
the problem also in this case here.
 [2000-04-14 09:19 UTC] rasmus at cvs dot php dot net
The fix suggested in 4143 has been applied
 [2024-11-26 21:04 UTC] git@php.net
Automatic comment on behalf of nielsdos (author) and web-flow (committer)
Revision: https://github.com/php/doc-en/commit/f38aa0ef2ec36f425ebb18c8978a4e19cf6e5017
Log: Fix #4140: Return type for function gmp_setbit() and gmp_clrbit() are incorrectly documented as GMP (#4162)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 10:01:33 2025 UTC