php-ext-mmap
php-ext-mmap copied to clipboard
Segmentation fault on raspian stretch and php7
Hello,
I've got a segmentation fault on pi3 with raspbian stretch and php7.0 when extension is enabled. It works with python script.
No idea what is the problem
Hi @michelpa - can you give some more details? Is it consistently reproducible?
I tried to debug where it happens and it is here:
$level = ($this->gpio_register[Register\GPIO::$GPLEV[$bank]] & $mask) >> $shift;
I have no knowledge in c but i've got two warning during make:
/tmp/php-ext-mmap/mmap.c:39:5: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
mmap_stream_write,
^~~~~~~~~~~~~~~~~
/tmp/php-ext-mmap/mmap.c:39:5: note: (near initialization for ‘mmap_ops.write’)
/tmp/php-ext-mmap/mmap.c:44:5: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
mmap_stream_seek,
^~~~~~~~~~~~~~~~
/tmp/php-ext-mmap/mmap.c:44:5: note: (near initialization for ‘mmap_ops.seek’)
I don't know if it can help...
I'll look into this - in the mean time, uninstall the extension and use the python fallback if you can handle it being a little slower.
Yep, no problem for my application with python script.
Thank your for your work!
His issue is resolved when #5 is merged.
#5 merged!