Bug #76746 [Opn->Fbk]: tried to allocate gigantic amount of memory

From: Date: Fri, 23 Oct 2020 12:37:25 +0000
Subject: Bug #76746 [Opn->Fbk]: tried to allocate gigantic amount of memory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229867@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76746&edit=1

 ID:                 76746
 Updated by:         cmb@php.net
 Reported by:        mschopdev at gmail dot com
 Summary:            tried to allocate gigantic amount of memory
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            *General Issues
 Operating System:   Windows-Ubuntu 18.04 Sub System
 PHP Version:        7.0.31
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Well, this has likely been caused by a memory corruption. Do you
still experience this with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>


Previous Comments:
------------------------------------------------------------------------
[2018-08-15 10:46:06] a at b dot c dot de

That is a bizarre number.

Interestingly, in hex it's "68732F737463656B", the ASCII encoding for
"hs/stcek" depending on endianness. Whether that helps I don't know. But if a
character pointer were substituted for a pointer to an integer the result would be something like
that.

Mind you, PHP 7.0 is in security-only fix at this point, so I doubt there'll be much energy
expended on this.

------------------------------------------------------------------------
[2018-08-15 07:55:59] mschopdev at gmail dot com

Description:
------------
I'm running Ubuntu 18.04 with ppa:ondrej/php in the Linux Sub-System under Windows.

PHP-Version: PHP 7.0.30-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May  2 2018 12:44:20) ( NTS )

This is the error message:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 7526411575186646379
bytes) in /mnt/c/Projects/shop/engine/Library/Customweb/Annotation/ReflectionAnnotatedMethod.php on
line 15

Unfortunatly I have not idea what caused the bug. A restart of the PHP7.0-fpm process solved the
issue for me. The test script contains the script that caused the problem, but I have no idea, what
the exact problem is.

I'm very sorry on this superficial bug report, but I have no further idea, how to reproduce
this again. If I have further details, I will add them later.



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

require_once 'Customweb/Annotation/IAnnotationReflector.php';
require_once 'Customweb/Annotation/AnnotationsBuilder.php';
require_once 'Customweb/Annotation/ReflectionAnnotatedClass.php';


class Customweb_Annotation_ReflectionAnnotatedMethod extends ReflectionMethod implements
Customweb_Annotation_IAnnotationReflector
{
    private
        $annotations;

    public function __construct($class, $name)
    {
        parent::__construct($class, $name); // This is the line, that caused the error
        
        $this->annotations = $this->createAnnotationBuilder()->build($this);
    }



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=76746&edit=1


Thread (1 message)

  • cmb@php.net
  • Unknown Message
    • cmb@php.net
« previous php.bugs (#229867) next »