Ben Ramsey
e4394946c2
license-update: update Zend copyright name
...
RFC: https://wiki.php.net/rfc/php_license_update
2026-04-11 21:20:54 -05:00
Ben Ramsey
084a10afef
license-update: Zend source headers
...
RFC: https://wiki.php.net/rfc/php_license_update
2026-04-11 21:20:54 -05:00
Christoph M. Becker
bd23d3ab6b
Remove unused variable (GH-17573)
2025-01-26 17:19:40 +01:00
Peter Kokot
062e9f9134
Remove unused buffer variables ( #15550 )
...
These emit warning: unused variable 'buffer'.
2024-08-23 16:40:19 +02:00
Peter Kokot
f952263bcd
Fix Solaris 10 build: missing libproc.h ( #15525 )
...
The libproc.h header file was added on Solaris as of 11.4.
* Also add guard check to the entire function
* When libproc.h isn't available also sys/procfs.h is redundant
* Move the <sys/lwp.h> out of the guard
* Exclude more stuff from Solaris 10
2024-08-22 20:26:44 +02:00
Arnaud Le Blanc
2269c06042
Fix stack limit under valgrind ( #14818 )
...
Valgrind creates a stack mapping that can grow up to RLIMIT_STACK, but the last
page is never useable
2024-07-05 17:09:45 +02:00
Arnaud Le Blanc
0bd260218b
Fix stack limit on ASAN/MSAN ( #14771 )
...
Increase the reserved stack size in ASAN builds, as instrumentation use more stack.
Increase the max allowed stack size in some tests, and enable these tests under ASAN.
Use __builtin_frame_address(0), instead of some stack variable, when we need a stack address, as ASAN may store local variables outside of the real stack.
2024-07-03 19:23:34 +02:00
Levi Morrison
62bfb01e00
refactor: zend_call_stack_get_linux_pthread
...
GCC doesn't pessimize the error cases correctly:
https://godbolt.org/z/Pa6xsKMWc
This speeds up the happy case and in this case the code size is also
smaller, so it's a double-win.
2024-06-10 10:40:40 -06:00
Florian Engelhardt
3c65375adb
fix memleak due to missing pthread_attr_destroy()-call
...
Closes GH-14510
2024-06-10 16:07:12 +02:00
David Carlier
19c8a10f3f
ext/pcntl: add pcntl_getcpu support for solaris.
...
using getcpuid having similar signature too.
close GH-14188
2024-05-11 05:53:10 +01:00
David Carlier
376061e73b
Merge branch 'PHP-8.3'
2024-03-30 22:22:00 +00:00
Fabrice Fontaine
5a043c26c8
Zend/zend_call_stack.c: fix build for Linux/uclibc-ng without pthread.
...
Fix the following build failure without pthread raised since version
8.3.0 and
https://github.com/php/php-src/commit/a11c8a30399e90c17c287b9656c0077bc5131c9c :
/home/buildroot/instance-0/output-1/build/php-8.3.4/Zend/zend_call_stack.c:39:11: fatal error: pthread.h: No such file or directory
39 | # include <pthread.h>
| ^~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/a4ef648a9da50b26ed56d5d490e4cf5a1bfff970
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com >
Close GH-13843
2024-03-30 22:19:02 +00:00
David CARLIER
e3b6872b51
zend call stack adjust case for freebsd to calculate the guard size. ( #13586 )
...
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.
2024-03-04 19:06:37 +00:00
David CARLIER
eaaffae555
zend_call_stack sort of GH-13358 follow-up. ( #13368 )
...
for threaded context, it solely uses a new api only available on
illumos.
Here using a common older api to get the stack info for the current
thread.
while at it, completing stack_limit_010 test for these platforms.
2024-02-16 14:01:03 +00:00
Peter Kokot
968f048b4c
Fix undefined symbol pthread_attr_get_np on Solaris ( #13358 )
...
Solaris doesn't have pthread_attr_get_np().
Checked on Oracle Solaris 11.4.
2024-02-09 00:46:07 +01:00
David Carlier
b320aabc5e
zend call stack fixing stack limit for macOs arm64.
...
8MB sounded a prudent size for older 10.9 macOs release, however
with newer mac with arm64, it triggers a stack overflow.
close GH-13319
2024-02-05 19:32:29 +00:00
David CARLIER
09838f17cb
zend_call_stack support proposal for solaris/illumos. ( #12862 )
2023-12-09 14:19:07 +00:00
David CARLIER
3944bb01eb
zend call stack for DragonFlyBSD. ( #12325 )
...
Shares the same codepaths as FreeBSD for the most part.
2023-10-01 13:12:14 +01:00
David CARLIER
14b827049a
zend call stack support for haiku w/o using posix pthread api but the ( #12103 )
...
underlying native BeOs one.
2023-09-29 11:47:23 +01:00
David Carlier
aef5225394
zend_call_stack_get implementation for NetBSD.
...
Despite being OpenBSD's predecessor, the approach is in fact
a lot closer to Linux, at least in principle. We purposely
avoid reading /proc/N/maps to be more future-proof.
Close GH-11637
2023-09-09 13:48:40 +01:00
David CARLIER
6602ddead5
zend call stack fix freebsd code path. ( #11766 )
...
The typo in HAVE_PTHREAD_ATTR_GET_STACK (might be due to pthread_attr_get_np being different from Linux's pthread_getattr_np) led to this code path never get called on FreeBSD.
2023-07-23 18:55:14 +01:00
David Carlier
343b599747
zend call stack, follow-up on 75e9980.
...
user stack usable implementation for openbsd.
Close GH-11626
2023-07-08 15:32:57 +01:00
David CARLIER
75e9980054
zend stack: prepare zend_call_stack_get implementation for OpenBSD. ( #11578 )
2023-07-07 18:03:07 +01:00
Christoph M. Becker
bf1cfc0753
Revert GH-10300
...
Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816 >.
This reverts commit 68ada76f9a .
his reverts commit 45384c6e20 .
This reverts commit ef7fbfd710 .
This reverts commit 9b9ea0d7c6 .
This reverts commit f15747c26b .
This reverts commit e883ba93c4 .
This reverts commit 7e87551c37 .
This reverts commit 921274d2b8 .
This reverts commit fc1f528e5e .
This reverts commit 0961715cda .
This reverts commit a93f264526 .
This reverts commit 72dd94e1c6 .
This reverts commit 29b2dc8964 .
This reverts commit 05c7653bba .
This reverts commit 5190e5c260 .
This reverts commit 6b55bf228c .
This reverts commit 184b4a12d3 .
This reverts commit 4c31b7888a .
This reverts commit d44e9680f0 .
This reverts commit 4069a5c43f .
2023-01-16 12:22:54 +01:00
Max Kellermann
05c7653bba
Zend/zend_call_stack: include cleanup
2023-01-15 15:07:58 +00:00
Arnaud Le Blanc
a11c8a3039
Limit stack size ( #9104 )
2022-12-16 17:44:26 +01:00