Skip to content

Fix stack limit under valgrind #14818

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

Merged
merged 1 commit into from
Jul 5, 2024
Merged

Conversation

arnaud-lb
Copy link
Member

Valgrind creates a stack mapping that can grow up to RLIMIT_STACK, but the last page is never useable.

This fixes Zend/tests/stack_limit/stack_limit_009.phpt and Zend/tests/arginfo_zpp_mismatch.phpt when running under valgrind, as long as php is compiled with --with-valgrind.

@arnaud-lb arnaud-lb marked this pull request as ready for review July 4, 2024 22:27
Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM even though I wonder why you include callgrind.h as the macro is defined in valgrind.h it seems

@arnaud-lb
Copy link
Member Author

Good catch, thank you! I copied the include from another place where we use the valgrind API, and didn't notice it included callgrind.h specifically.

Valgrind creates a stack mapping that can grow up to RLIMIT_STACK, but the last
page is never useable
@arnaud-lb arnaud-lb force-pushed the stack-limit-valgrind branch from 85d59a4 to fc8b17d Compare July 5, 2024 15:08
@arnaud-lb arnaud-lb merged commit 2269c06 into php:master Jul 5, 2024
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants