dg / bypass-finals

Removes `final` and `readonly` keywords from source code on-the-fly and allows mocking of final methods and classes. It can be used together with any test tool such as PHPUnit or Mockery.
Other
487 stars 30 forks source link

Segmentation fault with 1.4.0 when running phpunit with code coverage #35

Closed svnldwg closed 2 years ago

svnldwg commented 2 years ago

After upgrading to version 1.4.0 I get an error when running this command:

php -dxdebug.mode=coverage bin/phpunit

The error:

PHPUnit 9.5.24 #StandWithUkraine

Testing 
.Segmentation fault

This only occurs on 1.4.0, with version 1.3.1 everything works fine.

that-guy-iain commented 2 years ago

I also get this error. When xdebug is enabled it says there is an infinite loop.

And it doesn't depend on a specific test, if I choose to test just a subsection of tests, it'll still fail just on a different test.

PHPUnit 9.5.24 #StandWithUkraine

...EEEEEEEE.....................................EXdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames
dkarlovi commented 2 years ago

I had this too, the issue is you're calling enable() more than once. This causes it to see itself as the "previous wrapper" which was a fix for #9.

dextacy10-13 commented 2 years ago

We also had this

dg commented 2 years ago

Can you verify the fix?

that-guy-iain commented 2 years ago

I can confirm it's fixed. Thanks for the super quick fix!

shyim commented 2 years ago

With the fix, is blackfire broken. It segfaults without running even a trace. I am in contact with the support to find the root cause. just fyi if you having it locally also 😅