php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37089 Segmentation Fault on array_pop()
Submitted: 2006-04-15 07:05 UTC Modified: 2006-04-15 11:43 UTC
From: info at mgeiger dot de Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.1.2 OS: Linux
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: info at mgeiger dot de
New email:
PHP Version: OS:

 

 [2006-04-15 07:05 UTC] info at mgeiger dot de
Description:
------------
The command line php engine creates a segmentation fault when using array_pop(). The Apache module doesn't have this problem.

Reproduce code:
---------------
<?
   $ar = array (345, 567);
   var_dump ($ar);
   $v = array_pop ($ar);
   var_dump ($v);
?>


Actual result:
--------------
# /usr/local/php5/bin/php fehler.php

array(2) {
  [0]=>
  int(345)
  [1]=>
  int(567)
}
Segmentation fault


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-15 07:33 UTC] info at mgeiger dot de
Here's how I compiled PHP:

export CFLAGS="-march=c3 -O2"
./configure --prefix=/usr/local/php5 --with-apache=../apache_1.3.34/ --disable-ipv6 --with-zlib --with-gd --with-freetype-dir=/usr/include/freetype2 --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --enable-gd-native-ttf --with-pdo-pgsql --without-pdo-sqlite --with-pgsql --without-sqlite

gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
System: SuSE 10.0, Kernel 2.6.16.2


I have a parallel installation of version 4.4.2 where I cannot reproduce this error.

Configuration version 4.4.2:
./configure --with-apache=../apache_1.3.34/ --enable-track-vars --with-gd --with-pgsql --without-mysql --enable-gd-native-ttf --disable-ipv6 --with-zlib --with-freetype-dir=/usr/include/freetype2 --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib
 [2006-04-15 10:00 UTC] tony2001@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 for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

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.

Not reproducible.
 [2006-04-15 11:40 UTC] info at mgeiger dot de
Uh, looks like I had a kernel problem, my tar also crashed when I tried to recompile php.

Sorry, after a reboot php5 is fine ...   :-)
 [2006-04-15 11:43 UTC] tony2001@php.net
No bug -> bogus.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 13:01:35 2025 UTC