Skip to content

Conversation

@twose
Copy link
Member

@twose twose commented Aug 16, 2018

memory leak here, the size of the sub class's constants table should be added by the parent constants table size without private constants.

<?php
 class FOO
{
    private const FOO = 'BAR';
}
 class BAR extends FOO { }

@twose twose changed the title Private const extends Fixed #76754: parent private constant in extends class memory leak Aug 16, 2018
@twose twose force-pushed the private_const_extends branch from 66e9f70 to bd8a640 Compare August 17, 2018 01:52
@twose twose force-pushed the private_const_extends branch from bd8a640 to 7d59c37 Compare August 17, 2018 09:03
@twose
Copy link
Member Author

twose commented Aug 17, 2018

@laruence
I notice you have fixed it in bugs.php.net.
if check the correct constants table size is better? or you can close this pr.

@smalyshev smalyshev added the Bug label Aug 26, 2018
@smalyshev smalyshev requested a review from laruence August 26, 2018 23:53
@laruence
Copy link
Member

Hmm, sorry, didn't notice this PR before, anyway, I think the committed way is better, since similar memory also could leak in extension classes

@laruence laruence closed this Aug 27, 2018
@twose twose deleted the private_const_extends branch August 27, 2018 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants