|  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
 [2010-11-16 18:21 UTC] qdoggmets at hotmail dot com
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:

    STD_PHP_INI_ENTRY("",       "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)
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-12 22:59 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2012-06-12 22:59 UTC]
Try a newer version.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 31 09:03:39 2023 UTC