Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 906336

Summary: dev-lang/php: expose valgrind support
Product: Gentoo Linux Reporter: Sam James <sam>
Component: Current packagesAssignee: PHP Bugs <php-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: mjo
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=857597
https://bugs.gentoo.org/show_bug.cgi?id=878133
https://bugs.gentoo.org/show_bug.cgi?id=901969
https://bugs.gentoo.org/show_bug.cgi?id=905725
Whiteboard:
Package list:
Runtime testing required: ---

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-14 19:29:12 UTC
See also:
```
commit cc6da9230435494f3f96907f94c82b967328aee8
Author: Brian Evans <grknight@gentoo.org>
Date:   Fri Oct 28 15:21:59 2022 -0400

    dev-lang/php: Version bump for latest 8.2.0 RC

    Always enable ipv6 and disable valgrind as well

    Signed-off-by: Brian Evans <grknight@gentoo.org>
```

... and bug 905725, bug 857597, bug 901969, bug 878133, and bug 901969.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-14 19:29:52 UTC
Oops, I meant to write more in the original bug.

Having Valgrind annotations is pretty useful to avoid false positives and noise, especially if an application does a *lot* of internal memory handling like Zend does.

Could we have it under USE=valgrind please and not hard-disabled? Thanks.
Comment 2 Brian Evans (RETIRED) gentoo-dev 2023-05-15 02:33:33 UTC
I'm not sure the value here because I don't understand valgrind, but I'll list what PHP does with valgrind at this point with the specified configure flag:

in Zend/zend_fibers.c: Registers and unregisters a stack

in Zend/zend_string.c: it loads a header then ignores the rest that I can tell

in php-cgi main loop: it enables/disables telemetry (note that php-cgi is used but not the first choice of many)

in opcache jit, it disables valgrind translations (whatever that is)

The rest of PHP ignores valgrind API in linking.
Comment 3 Larry the Git Cow gentoo-dev 2023-07-31 00:53:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b86e0533bfe57f2889c0b29834f566be0f0ad55f

commit b86e0533bfe57f2889c0b29834f566be0f0ad55f
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2023-07-30 12:35:10 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2023-07-31 00:49:13 +0000

    dev-lang/php: add valgrind support (8.2 slot only).
    
    Closes: https://bugs.gentoo.org/906336
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 dev-lang/php/{php-8.2.8-r1.ebuild => php-8.2.8-r2.ebuild} | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)