php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59512 format=1 segmentation fault
Submitted: 2010-11-16 18:21 UTC Modified: 2012-06-12 22:59 UTC
From: qdoggmets at hotmail dot com Assigned: felipe (profile)
Status: Closed Package: vld (PECL)
PHP Version: 5.3.2 OS: centos
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.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: qdoggmets at hotmail dot com
New email:
PHP Version: OS:

 

 [2010-11-16 18:21 UTC] qdoggmets at hotmail dot com
Description:
------------
1) the format=1 flag passed from the command prompt doesn't do anything.

2) if you modify the format flag in the code to hit the code block which formats it and inserts the column seperator, the code starts to work and format correctly however after a few seconds the program will segmentation fault, core dump and exit


reason looking for this: looking for a way to parse the opcode array. currently using a  ">> /file.php.opcodes 2>&1" to pipe stderr output to text file for parsing later. command piping does not respect \t column seperator formatting in the file. it is all converted to single spaces. there is no simple way to parse because 50 percent of fields can be missing. 


Reproduce code:
---------------
vld.c

PHP_INI_BEGIN()
    STD_PHP_INI_ENTRY("vld.active",       "0", PHP_INI_SYSTEM, OnUpdateBool, active,       zend_vld_globals, vld_globals)
    STD_PHP_INI_ENTRY("vld.skip_prepend", "0", PHP_INI_SYSTEM, OnUpdateBool, skip_prepend, zend_vld_globals, vld_globals)
    STD_PHP_INI_ENTRY("vld.skip_append",  "0", PHP_INI_SYSTEM, OnUpdateBool, skip_append,  zend_vld_globals, vld_globals)
    STD_PHP_INI_ENTRY("vld.execute",      "1", PHP_INI_SYSTEM, OnUpdateBool, execute,      zend_vld_globals, vld_globals)
    STD_PHP_INI_ENTRY("vld.verbosity",    "1", PHP_INI_SYSTEM, OnUpdateBool, verbosity,    zend_vld_globals, vld_globals)
    STD_PHP_INI_ENTRY("vld.format",       "1", PHP_INI_SYSTEM, OnUpdateBool, format,       zend_vld_globals, vld_globals)
    STD_PHP_INI_ENTRY("vld.col_sep",      "<new seperator>", PHP_INI_SYSTEM, OnUpdateString, col_sep,   zend_vld_globals, vld_globals)
	STD_PHP_INI_ENTRY("vld.save_dir",     "/tmp", PHP_INI_SYSTEM, OnUpdateString, save_dir, zend_vld_globals, vld_globals)
	STD_PHP_INI_ENTRY("vld.save_paths",   "0", PHP_INI_SYSTEM, OnUpdateBool, save_paths,   zend_vld_globals, vld_globals)
	STD_PHP_INI_ENTRY("vld.dump_paths",   "1", PHP_INI_SYSTEM, OnUpdateBool, dump_paths,   zend_vld_globals, vld_globals)
PHP_INI_END()
 
static void vld_init_globals(zend_vld_globals *vld_globals)
{
	vld_globals->active       = 0;
	vld_globals->skip_prepend = 0;
	vld_globals->skip_append  = 0;
	vld_globals->execute      = 1;
	vld_globals->format       = 1;
	vld_globals->col_sep	  = "<new seperator>";
}

Expected result:
----------------
output should be seperated by <new seperator>

Actual result:
--------------
segmentation fault, core dump, abortion

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-12 22:59 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2012-06-12 22:59 UTC] felipe@php.net
Try a newer version.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 06:01:29 2024 UTC