Skip to content

zend_call_stack.c: AIX backend - #22906

Draft
NattyNarwhal wants to merge 3 commits into
php:masterfrom
NattyNarwhal:aix-stack-limit
Draft

zend_call_stack.c: AIX backend#22906
NattyNarwhal wants to merge 3 commits into
php:masterfrom
NattyNarwhal:aix-stack-limit

Conversation

@NattyNarwhal

Copy link
Copy Markdown
Member

Uses pthread_getthrds_np (so requires pthread linked, by default on ZTS, needs to be added for NTS). The stack size part is weird, but works in testing.

An alternative approach is using procfs, but I didn't bother with this due to it not working on PASE (and the pthread approach works for the main thread too).

Uses pthread_getthrds_np (so requires pthread linked, by default on ZTS,
needs to be added for NTS). The stack size part is weird, but works in
testing.

An alternative approach is using procfs, but I didn't bother with this
due to it not working on PASE (and the pthread approach works for the
main thread too).
Comment thread Zend/zend_call_stack.c
...and pass a NULL register buffer, since this is only used with
suspended threads. something that'll never happen if we invoke it on
ourself. We still need to pass the size though.
Comment thread Zend/zend_call_stack.c Outdated
{
#ifdef HAVE_PTHREAD_GETTHRDS_NP
pthread_t pt = pthread_self();
struct __pthrdsinfo thread_info;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do not know the system as much as you, however

struct __pthrdsinfo thread_info = {0};

might be more prudent, wdyt ?

Comment thread Zend/zend_call_stack.c
Zero out the pthread struct, check if the pointers are nil, add extra
comment about stackaddr
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