php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7700 var_dump() crashes
Submitted: 2000-11-08 15:04 UTC Modified: 2001-01-30 04:09 UTC
From: steinm@php.net Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Latest CVS (08/11/2000) OS: LinuxPPC 2.2.18
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: steinm@php.net
New email:
PHP Version: OS:

 

 [2000-11-08 15:04 UTC] steinm@php.net
The following script crashes php

<?php
$arr[0] = 1;
$arr = array_merge($arr, array(2, 3, 4));
var_dump($arr);
?>

Here is the output and backtrace

[steinm@steinpb DatenbankLayout]$ php -f test.php 
array(4) {
  [0]=>
  int(1)
 [1]=>
 int(2)
 [2]=>
 int(3)
Speicherzugriffsfehler (core dumped)
[steinm@steinpb DatenbankLayout]$ gdb -f /usr/local/bin/php
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ppc-redhat-linux"...
(gdb) run -f test.php
Starting program: /usr/local/bin/php -f test.php
array(4) {
  [0]=>
  int(1)
 [1]=>
 int(2)
 [2]=>
 int(3)

Program received signal SIGSEGV, Segmentation fault.
0xfc452e8 in vfprintf () at vfprintf.c:1565
1565	vfprintf.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  0xfc452e8 in vfprintf () at vfprintf.c:1565
#1  0xfc55ef0 in _IO_vsnprintf (string=0x7fffd660 "", maxlen=4096, 
    format=0x1011e9a8 "%*c[%ld]=>\n", args=0x7fffd650) at vsnprintf.c:129
#2  0x1001b0d4 in php_printf (format=0x30015001 "int(3)\n\n{\n") at main.c:327
#3  0x100aaf18 in php_array_element_dump (zv=0x1019893c, num_args=269609384, 
    args=0x30015001, hash_key=0xfcf114c) at var.c:48
#4  0x100d6210 in zend_hash_apply_with_arguments (ht=0x10198828, 
    destruct=0x100aaea4 <php_array_element_dump>, num_args=1)
    at zend_hash.c:737
#5  0x100ab220 in php_var_dump (struc=0x10198828, level=1) at var.c:93
#6  0x100ab374 in php_if_var_dump (ht=0, return_value=0x1011e9a8, 
    this_ptr=0x30015001, return_value_used=265228620) at var.c:131
#7  0x10105da4 in execute (op_array=0x10194098) at ./zend_execute.c:1519
#8  0x100d1720 in zend_execute_scripts (type=0, file_count=3) at zend.c:729
#9  0x1001ca94 in php_execute_script (primary_file=0x7ffffb58) at main.c:1210
#10 0x1001a8d4 in main (argc=3, argv=0x7ffffc54) at cgi_main.c:741
(gdb) 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-04 08:43 UTC] sniper@php.net
Works for me just fine with latest CVs..does it work
for you now?

--Jani
 [2001-01-30 04:09 UTC] sniper@php.net
No feedback, considered fixed.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC