Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP: segmentation fault when exiting #12403

Closed
barhom opened this issue Jun 4, 2020 · 3 comments · Fixed by #12536
Closed

PHP: segmentation fault when exiting #12403

barhom opened this issue Jun 4, 2020 · 3 comments · Fixed by #12536
Assignees

Comments

@barhom
Copy link

barhom commented Jun 4, 2020

When running any PHP script the script finishes successfully however exits with a "Segmentation fault".

Running master from 2020-06-04.
Packages installed:

opkg list-installed | grep php
php7 - 7.4.6-1
php7-cli - 7.4.6-1
php7-mod-filter - 7.4.6-1
php7-mod-json - 7.4.6-1
php7-mod-mbstring - 7.4.6-1
php7-mod-openssl - 7.4.6-1

The php script:

# cat test.php 
<?php
echo "HELLO WORLD\n";

The output:

# php-cli test.php 
HELLO WORLD
Segmentation fault
@mhei mhei self-assigned this Jun 4, 2020
@barhom
Copy link
Author

barhom commented Jun 6, 2020

@mhei do you know what is causing this?

Thanks

@mhei
Copy link
Member

mhei commented Jun 10, 2020

Sorry to the long delay. It seems to be a problem with the mbstring extension: when I disable this extension, then the segfault goes away. Will try to dig deeper into this...

@mhei
Copy link
Member

mhei commented Jun 14, 2020

I traced it down with gdb to be a problem in oniguruma:

Program received signal SIGSEGV, Segmentation fault.
0xb6e37f70 in i_free_callout_name_entry (key=0x369040, e=0x0, arg=0x37afe0) at oniguruma-6.9.5_rev1/src/regparse.c:1297

I'll create a PR with a fix, see kkos/oniguruma#196.

mhei added a commit to mhei/packages that referenced this issue Jun 14, 2020
I propose to carry this patch until a new upstream
release includes it. For forther references see:

openwrt#12403
and
kkos/oniguruma#196

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
cotequeiroz pushed a commit that referenced this issue Jun 15, 2020
I propose to carry this patch until a new upstream
release includes it. For forther references see:

#12403
and
kkos/oniguruma#196

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
farmergreg pushed a commit to farmergreg/packages that referenced this issue Sep 8, 2020
I propose to carry this patch until a new upstream
release includes it. For forther references see:

openwrt#12403
and
kkos/oniguruma#196

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
farmergreg pushed a commit to farmergreg/packages that referenced this issue Sep 8, 2020
I propose to carry this patch until a new upstream
release includes it. For forther references see:

openwrt#12403
and
kkos/oniguruma#196

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants