Skip to content

zend call stack adjust case for freebsd to calculate the guard size. #13586

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 2 commits into from
Mar 4, 2024

Conversation

devnexen
Copy link
Member

@devnexen devnexen commented Mar 3, 2024

it was not wrong but there is a sysctl oid storing the number of guard pages, which is 1 by default but is modifiable at runtime.

it was not wrong but there is a sysctl oid storing the number of guard
pages, which is 1 by default but is modifiable at runtime.
Copy link
Member

@arnaud-lb arnaud-lb left a comment

Choose a reason for hiding this comment

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

Looks good to me

if (sysctlbyname("security.bsd.stack_guard_page", &tmpguards, &len, NULL, 0) != 0) {
return false;
}
numguards = tmpguards;
Copy link
Member

Choose a reason for hiding this comment

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

Is this thread safe? Are you relying on the fact that its a word sized write?

@devnexen devnexen merged commit e3b6872 into php:master Mar 4, 2024
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