Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[phpdbg] Segfault with phpunit and codecoverage #13707

Closed
lyrixx opened this issue Mar 14, 2024 · 3 comments
Closed

[phpdbg] Segfault with phpunit and codecoverage #13707

lyrixx opened this issue Mar 14, 2024 · 3 comments

Comments

@lyrixx
Copy link

lyrixx commented Mar 14, 2024

Description

I created a very minimal reproducer there

PHP Version

PHP 8.3.3-1+ubuntu22.04.1+deb.sury.org+1 (cli) (built: Feb 15 2024 18:38:52) (NTS)

Operating System

Ubuntu 22.04.4 LTS

lyrixx added a commit to lyrixx/test that referenced this issue Mar 14, 2024
nicolas-grekas added a commit to symfony/symfony that referenced this issue Mar 14, 2024
This PR was merged into the 7.1 branch.

Discussion
----------

[PhpUnitBridge] Enhance CoverageListenerTests

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

The test were broken on my laptop, so I dig it a bit and:

* Add support support for pvoc
* Change priority of driver, it's now xdebug > pcov > phpdbg (reflects
  more real usages)
* Update deprecated phpunit.xml.dist configuration
* Ensure the $output buffer is empty before running sub-tests
* open php bug report because phpdbg segfault, see php/php-src#13707

Commits
-------

4f49fd3 [PhpUnitBridge] Enhance CoverageListenerTests
@nielsdos
Copy link
Member

I can't reproduce this. Try without loading php extensions and please share your phpinfo.
If possible, try compiling php with ASAN support.

@lyrixx
Copy link
Author

lyrixx commented Mar 15, 2024

I found the culprit

>/home/gregoire/dev/github.com/lyrixx/test(php/php-src/issues/13707 %) phpdbg -nqrrv -d extension=dom -d extension=mbstring -d extension=tokenizer -d extension=xml -d extension=xmlwriter -d extension=pcov vendor/bin/phpunit   --coverage-text
PHPUnit 9.6.17 by Sebastian Bergmann and contributors.

Segmentation fault (core dumped)
>/home/gregoire/dev/github.com/lyrixx/test```

It fails when I enable pcov

@nielsdos
Copy link
Member

Okay, thanks for investigating.
I would recommend opening a bug report then at the pcov extension repo. This is likely an issue there and not in php(dbg) itself.
If it would turn out that it is a php issue after all, please ping me and I'll reopen this.

@nielsdos nielsdos closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants