File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ $stack = zend_test_zend_call_stack_get();
15
15
var_dump ($ stack );
16
16
17
17
$ expectedMaxSize = match (php_uname ('s ' )) {
18
- 'Darwin ' => 8 *1024 *1024 ,
18
+ 'Darwin ' => match (php_uname ('m ' )) {
19
+ 'x86_64 ' => 8 *1024 *1024 ,
20
+ 'arm64 ' => 8372224 ,
21
+ },
19
22
'FreeBSD ' => match (php_uname ('m ' )) {
20
23
'amd64 ' => 512 *1024 *1024 - 4096 ,
21
24
'i386 ' => 64 *1024 *1024 - 4096 ,
Original file line number Diff line number Diff line change @@ -428,6 +428,7 @@ static bool zend_call_stack_get_macos(zend_call_stack *stack)
428
428
size_t max_size ;
429
429
430
430
if (pthread_main_np ()) {
431
+ #if !defined(__aarch64__ )
431
432
/* pthread_get_stacksize_np() returns a too low value for the main
432
433
* thread in OSX 10.9, 10.10:
433
434
* https://mail.openjdk.org/pipermail/hotspot-dev/2013-October/011353.html
@@ -437,6 +438,9 @@ static bool zend_call_stack_get_macos(zend_call_stack *stack)
437
438
/* Stack size is 8MiB by default for main threads
438
439
* https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html */
439
440
max_size = 8 * 1024 * 1024 ;
441
+ #else
442
+ max_size = pthread_get_stacksize_np (pthread_self ());
443
+ #endif
440
444
} else {
441
445
max_size = pthread_get_stacksize_np (pthread_self ());
442
446
}
You can’t perform that action at this time.
0 commit comments