Dmitry Stogov
Dmitry Stogov
The asm above is a part of MIR interpreter (probably handler for MOVD instruction). I discovered it using the same mandelbrot benchmark https://gist.github.com/dstogov/f055056c7ada569d4f87d3831dbeaac3 ```sh $ perf record ./c2m mandelbrot.c -ei...
This is for moving only between %xmm registers, of course.
Your function gets constant (immutable) array, that has to be separated. ```C PHP_FUNCTION(test_test1) { zval *arr; zend_long key, n; ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_ZVAL(arr) Z_PARAM_LONG(key) Z_PARAM_LONG(n) ZEND_PARSE_PARAMETERS_END(); zval *subarr = zend_hash_index_find(Z_ARR_P(arr), key);...
probably, "subarr" may be not an array. You should check ``if (Z_TYPE_P(subarr) == IS_ARRAY)`` and handle non-array case.
This repository keeps code from php-extension tutorial, that is going to be published soon. The work is still in progress.
I can't guess what is wrong in your code, if you don't show it. In the following example the assignment works without problems. (I hope, you use ext/ffi bundled into...
I hope, you use ext/ffi bundled into PHP-7.4/8.0. (this branch is not supported any more). To debug the problem, try to run php under debugger and then check the gdb...
Everything is possible.... I would suggest to run PHP under gdb ``` $ gdb --args php your_script.php (gdb) r ; in case of crash (gdb) bt ```
According to backtrace, there where some error in __dlopen(). May be loader can't find some dependent shared libraries. Try to run ``ldd your_lib.so``, check if all libraries are resolved. In...
It's possible to investigate the failure a bit deeper. In gdb, you may try to go ``down`` to frame ``#22`` and ``print errstring``. ``` ... #21 0x00007ffff75ad260 in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffa680,...