php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57333 Bus Error
Submitted: 2006-10-30 10:49 UTC Modified: 2006-10-30 11:49 UTC
From: christian_boitel at yahoo dot fr Assigned:
Status: Closed Package: APC (PECL)
PHP Version: Irrelevant OS: Solaris 9
Private report: No CVE-ID: None
 [2006-10-30 10:49 UTC] christian_boitel at yahoo dot fr
Description:
------------
Word alignment problem in apc_sma.c causes bus error.



Reproduce code:
---------------
<?php
phpinfo();
?>

In release 1.53, a pad element to ensure structure header_t is aligned was added.

In release 1.54, a new element was added in the structure which makes the padding added in release 1.53 useless and now causes structure to no longer be aligned.

Patch is provided below:
--- apc_sma.c.original  2006-10-20 08:47:09.000000000 +0200
+++ apc_sma.c   2006-10-30 16:48:32.046875000 +0100
@@ -60,7 +60,6 @@
     size_t segsize;    /* size of entire segment */
     size_t avail;      /* bytes available (not necessarily contiguous) */
     size_t nfoffset;   /* start next fit search from this offset       */
-    size_t padding;    /* Unused - just padding up to an even boundary */
 #if ALLOC_DISTRIBUTION
     size_t adist[30];
 #endif



Expected result:
----------------
phpinfo displayed

Actual result:
--------------
blank page

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-30 11:49 UTC] gopalv82 at yahoo dot com
Applied, please confirm.

http://cvs.php.net/viewvc.cgi/pecl/apc/apc_sma.c?r1=1.54&r2=1.55

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 04:01:30 2024 UTC