php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15051 assigning a reference of a part of an array to itself
Submitted: 2002-01-15 11:51 UTC Modified: 2002-08-06 01:00 UTC
From: kaufmann at bluehands dot de Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 4.1.1 OS: S.u.S.E Linux 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kaufmann at bluehands dot de
New email:
PHP Version: OS:

 

 [2002-01-15 11:51 UTC] kaufmann at bluehands dot de
**** the script
$data[1][a] = 1;

$data = &$data[1];    // crashes here without --enable-debug

print_r($data);       // crashes here with --enable-debug


**** the system
Suse Linux 7.1
Linux camouflage 2.4.5 #8 Tue Jun 26 17:05:34 CEST 2001 i686 unknown
Server Version: Apache/1.3.22 (Unix) PHP/4.1.1 mod_backhand/1.2.1


**** PHP configuration
./configure \
  --without-mysql \
  --with-sybase-ct=/opt/sybase/ \
  --with-apxs=/opt/apache/bin/apxs \
  --enable-debug
 

**** apache error-log 
FATAL:  erealloc():  Unable to allocate 1515872257 bytes (only with --enable-debug)
[Sun Jan 13 19:05:30 2002] [notice] child pid 5198 exit signal Segmentation fault (11)                                      


**** backtrace
unfortunately I can't get a backtrace of the apache


**** description
for a long time we run a quite complex web application with php up to version 4.0.6 without problems. With php 4.1.1 all constructions trying to reduce the depth of a large array by assigning a reference to itself let apache crash. While debugging this problem I discovered a very short and easy script to reproduce the crash. It's somewhat strage that the short script also crashes with php 4.0.6. Anyway, removing all constructions like $array = &$array[index] from all our scripts fixed the problem for our web application.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-04 18:28 UTC] eru@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

---
Please try to reproduce with a fresher version of PHP

Thanks.

 [2002-08-06 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 06:03:37 2021 UTC