php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_test.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef PHP_TEST_H
18#define PHP_TEST_H
19
20#include "fiber.h"
21
23#define phpext_zend_test_ptr &zend_test_module_entry
24
25#define PHP_ZEND_TEST_VERSION "0.1.0"
26
27#ifdef ZTS
28#include "TSRM.h"
29#endif
30
31#if defined(ZTS) && defined(COMPILE_DL_ZEND_TEST)
33#endif
34
66
67 // the previous heap that was found in ZendMM
69 // the custom handlers that might have been found in the previous heap
73 size_t (*custom_gc)(void);
74 void (*custom_shutdown)(bool, bool);
75 // this is our heap that we install our custom handlers on and inject into
76 // ZendMM
79
81
82#define ZT_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(zend_test, v)
83
84struct bug79096 {
85 uint64_t a;
86 uint64_t b;
87};
88
89#ifdef PHP_WIN32
90# define PHP_ZEND_TEST_API __declspec(dllexport)
91#elif defined(__GNUC__) && __GNUC__ >= 4
92# define PHP_ZEND_TEST_API __attribute__ ((visibility("default")))
93#else
94# define PHP_ZEND_TEST_API
95#endif
96
97PHP_ZEND_TEST_API int ZEND_FASTCALL bug78270(const char *str, size_t str_len);
98
100PHP_ZEND_TEST_API void bug79532(off_t *array, size_t elems);
101
102extern PHP_ZEND_TEST_API int *(*bug79177_cb)(void);
103PHP_ZEND_TEST_API void bug79177(void);
104
105#endif
struct _zend_test_fiber zend_test_fiber
Definition fiber.h:22
int replace_zend_execute_ex
Definition php_test.h:54
zend_string * not_empty_str_test
Definition php_test.h:64
int observer_observe_functions
Definition php_test.h:40
zend_mm_heap * observed_heap
Definition php_test.h:77
PHP_ZEND_TEST_API void bug79177(void)
Definition test.c:1472
zend_mm_heap * zend_test_heap
Definition php_test.h:60
void *(* custom_realloc)(void *, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
Definition php_test.h:72
int observer_fiber_destroy
Definition php_test.h:51
int observe_opline_in_zendmm
Definition php_test.h:58
HashTable global_weakmap
Definition php_test.h:53
zend_string * str_test
Definition php_test.h:63
size_t(* custom_gc)(void)
Definition php_test.h:73
void(* custom_shutdown)(bool, bool)
Definition php_test.h:74
int observer_show_return_type
Definition php_test.h:43
void(* custom_free)(void *ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
Definition php_test.h:71
zend_mm_heap * original_heap
Definition php_test.h:68
int observer_observe_all
Definition php_test.h:38
int observer_observe_declaring
Definition php_test.h:41
int observer_observe_includes
Definition php_test.h:39
zend_test_fiber * active_fiber
Definition php_test.h:61
zend_long limit_copy_file_range
Definition php_test.h:57
#define PHP_ZEND_TEST_API
Definition php_test.h:94
int zend_mm_custom_handlers_enabled
Definition php_test.h:65
int observer_nesting_depth
Definition php_test.h:48
int register_passes
Definition php_test.h:55
int observer_enabled
Definition php_test.h:36
zend_mm_heap * zend_orig_heap
Definition php_test.h:59
int observer_execute_internal
Definition php_test.h:52
int observer_fiber_switch
Definition php_test.h:50
void *(* custom_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
Definition php_test.h:70
int observer_show_return_value
Definition php_test.h:44
int observer_show_opcode
Definition php_test.h:46
int observer_show_output
Definition php_test.h:37
int observer_show_init_backtrace
Definition php_test.h:45
char * observer_show_opcode_in_user_handler
Definition php_test.h:47
PHP_ZEND_TEST_API struct bug79096 bug79096(void)
Definition test.c:1455
zend_long quantity_value
Definition php_test.h:62
PHP_ZEND_TEST_API int ZEND_FASTCALL bug78270(const char *str, size_t str_len)
Definition test.c:1447
PHP_ZEND_TEST_API void bug79532(off_t *array, size_t elems)
Definition test.c:1464
int observer_fiber_init
Definition php_test.h:49
zend_array * observer_observe_function_names
Definition php_test.h:42
bool print_stderr_mshutdown
Definition php_test.h:56
zend_module_entry zend_test_module_entry
Definition test.c:1422
$obj a
Definition test.php:84
#define ZEND_TSRMLS_CACHE_EXTERN()
Definition zend.h:67
#define ZEND_DECLARE_MODULE_GLOBALS(module_name)
Definition zend_API.h:268
#define ZEND_END_MODULE_GLOBALS(module_name)
Definition zend_API.h:248
#define ZEND_BEGIN_MODULE_GLOBALS(module_name)
Definition zend_API.h:246
struct _zend_mm_heap zend_mm_heap
Definition zend_alloc.h:244
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
int32_t zend_long
Definition zend_long.h:42
struct _zend_string zend_string
struct _zend_module_entry zend_module_entry
#define ZEND_FILE_LINE_DC
#define ZEND_FASTCALL
#define ZEND_FILE_LINE_ORIG_DC
struct _zend_array zend_array
struct _zend_array HashTable
Definition zend_types.h:386