Bug #78903 [Com]: "Allowed memory size" and "bus error" crashes in 7.4 that do not appear in 7.3

From: Date: Wed, 04 Dec 2019 13:25:30 +0000
Subject: Bug #78903 [Com]: "Allowed memory size" and "bus error" crashes in 7.4 that do not appear in 7.3
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224063@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78903&edit=1

 ID:                 78903
 Comment by:         chartjes at grumpy-learning dot com
 Reported by:        chartjes at grumpy-learning dot com
 Summary:            "Allowed memory size" and "bus error" crashes in 7.4
                     that do not appear in 7.3
 Status:             Open
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   macOS 10.15.1
 PHP Version:        7.4.0
 Block user comment: N
 Private report:     N

 New Comment:

My apologies for not providing clearer instructions for running the tests.

You could copy phpunit.xml.dist to phpunit.xml and change the memory_limit value in there, which the
tests will then use.


Previous Comments:
------------------------------------------------------------------------
[2019-12-04 08:33:36] nikic@php.net

Turns out the memory_limit is set in the phpunit.xml.dist, and removing it there does produce a
segfault. There is no useful trace because a corrupted function causes a jump to an invalid address.
Unfortunately there are no warnings under valgrind.

------------------------------------------------------------------------
[2019-12-04 07:32:32] nikic@php.net

After creating a cfp_test mysql user and database and running "make integration" first, I
now get:

Fatal error: Allowed memory size of 805306368 bytes exhausted at
/home/nikic/php-7.4/Zend/zend_hash.c:2079 (tried to allocate 1048616 bytes) in
/home/nikic/repos/opencfp/vendor/fzaninotto/faker/src/Faker/Provider/Text.php on line 84

I was not able to set memory_limit=-1 to produce the bus error, because the test runner apparently
ignores ini files and options specified on the command line.

------------------------------------------------------------------------
[2019-12-04 07:17:42] nikic@php.net

Can't reproduce memory limit / bus error, presumably because the test suite does not work
correctly: I get a lot of "RuntimeException: The config file
"/home/nikic/repos/opencfp/config/testing.yml" does not exist" errors.

------------------------------------------------------------------------
[2019-12-03 22:46:32] chartjes at grumpy-learning dot com

The command I use to run the integration test suite is:

SYMFONY_DEPRECATIONS_HELPER=disabled CFP_ENV=testing vendor/bin/phpunit --testsuite integration

If I set memory_limit in my phpunit.xml file to be -1, it crashes with a bus error.

gdb has issues on macOS Catalina where it needs to be codesigned and I have tried numerous fixes to
get it to work and have been unsuccessful.

------------------------------------------------------------------------
[2019-12-03 21:38:41] derick@php.net

It'd be really helpful if you explained how to run the test suite in there. I also thought you
mentioned memory_limit=-1 and a bus error? The latter comes with segfault usually, which you can
make with gdb: https://bugs.php.net/bugs-generating-backtrace.php

You can run that as:
gdb --args php which phpunit

And then "run" on the gdb prompt

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=78903


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


Thread (13 messages)

« previous php.bugs (#224063) next »