php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67132 Long docblock causes memoryleak.
Submitted: 2014-04-25 13:53 UTC Modified: 2014-04-25 16:03 UTC
From: m dot celmare at gmail dot com Assigned:
Status: Wont fix Package: Reproducible crash
PHP Version: 5.4.27 OS: Windows 7 64bit
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: m dot celmare at gmail dot com
New email:
PHP Version: OS:

 

 [2014-04-25 13:53 UTC] m dot celmare at gmail dot com
Description:
------------
When using Swagger-PHP to parse API Models with massive docblocks Apache resets the connection. PHP doesn't record any error in the php-error.log. The operating system records the following error in it's log:

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	httpd.exe
  Application Version:	2.4.9.0
  Application Timestamp:	5326ca71
  Fault Module Name:	php5ts.dll
  Fault Module Version:	5.4.27.0
  Fault Module Timestamp:	533ca875
  Exception Code:	c00000fd
  Exception Offset:	0006d2c2
  OS Version:	6.1.7601.2.1.0.256.1
  Locale ID:	1033
  Additional Information 1:	fe6d
  Additional Information 2:	fe6de80cc3219ffbfd252ae4bf2c0ab7
  Additional Information 3:	284c
  Additional Information 4:	284c285a14d3981816a2687969853162

This problem appeared both in PHP 5.4.27 and PHP 5.4.16 both being the 32bit version. I was able to reproduce the issue with both: 
   WAMPSERVER (32 bits & PHP 5.4) 2.4
   XAMPP (1.8.2 / PHP 5.4.27) 32bits

Test script:
---------------
<?php

namespace Controllers\API\Company\RequestModels;

/**
 * @SWG\Model()
 */
class Search {

    /**
     * @SWG\Property(required=true, type="SearchFilter")
     */
    public $filter;

    /**
     * @SWG\Property(required=true, type="string", enum="['active_member.asc','active_member.desc','name.asc','name.desc','jobs_count.asc','jobs_count.desc','cv_download_limit.asc','cv_download_limit.desc','references_count.asc','references_count.desc','last_login.asc','last_login.desc','register_date.asc','register_date.desc','last_comment_date_created.asc','last_comment_date_created.desc']")
     */
    public $sort;

    /**
     * @SWG\Property(required=true, type="integer")
     */
    public $pageNr;

    /**
     * @SWG\Property(required=true, type="integer")
     */
    public $pageSize;

}

Expected result:
----------------
When parsing with Swagger PHP a JSON should be produced.

Actual result:
--------------
Apache resets the connection.
The Operating System logs the following error:

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	httpd.exe
  Application Version:	2.4.9.0
  Application Timestamp:	5326ca71
  Fault Module Name:	php5ts.dll
  Fault Module Version:	5.4.27.0
  Fault Module Timestamp:	533ca875
  Exception Code:	c00000fd
  Exception Offset:	0006d2c2
  OS Version:	6.1.7601.2.1.0.256.1
  Locale ID:	1033
  Additional Information 1:	fe6d
  Additional Information 2:	fe6de80cc3219ffbfd252ae4bf2c0ab7
  Additional Information 3:	284c
  Additional Information 4:	284c285a14d3981816a2687969853162

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-25 16:03 UTC] bjori@php.net
-Status: Open +Status: Wont fix -Package: Doc Build problem +Package: Reproducible crash
 [2014-04-25 16:03 UTC] bjori@php.net
swagger is not a php.net extension.

Please report issues on their github page: https://github.com/zircote/swagger-php/issues
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Jan 24 10:01:24 2021 UTC